mirror of
https://github.com/robotn/gohook.git
synced 2025-04-27 14:32:55 +08:00
decided to fork forever
This commit is contained in:
parent
d5e965f25c
commit
35fdcff3ec
12
README.md
12
README.md
@ -1,9 +1,9 @@
|
||||
# gohook
|
||||
# ghook (gohook fork)
|
||||
|
||||
[](https://circleci.com/gh/cauefcr/gohook)
|
||||

|
||||
[](https://goreportcard.com/report/github.com/cauefcr/gohook)
|
||||
[](https://godoc.org/github.com/cauefcr/gohook)
|
||||
[](https://circleci.com/gh/cauefcr/ghook)
|
||||

|
||||
[](https://goreportcard.com/report/github.com/cauefcr/ghook)
|
||||
[](https://godoc.org/github.com/cauefcr/ghook)
|
||||
<!-- This is a work in progress. -->
|
||||
|
||||
Based on [libuiohook](https://github.com/kwhat/libuiohook)
|
||||
@ -14,7 +14,7 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
//"github.com/robotn/gohook"
|
||||
"github.com/cauefcr/gohook"
|
||||
"github.com/cauefcr/ghook"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
17
hook.go
17
hook.go
@ -29,8 +29,7 @@ import (
|
||||
"time"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
onst (
|
||||
HookEnabled = 1 //iota
|
||||
HookDisabled = 2
|
||||
KeyDown = 3
|
||||
@ -292,12 +291,12 @@ func End() {
|
||||
}
|
||||
|
||||
// AddEvent add event listener
|
||||
func AddEvent(key string) int {
|
||||
cs := C.CString(key)
|
||||
defer C.free(unsafe.Pointer(cs))
|
||||
// func AddEvent(key string) int {
|
||||
// cs := C.CString(key)
|
||||
// defer C.free(unsafe.Pointer(cs))
|
||||
|
||||
eve := C.add_event(cs)
|
||||
geve := int(eve)
|
||||
// eve := C.add_event(cs)
|
||||
// geve := int(eve)
|
||||
|
||||
return geve
|
||||
}
|
||||
// return geve
|
||||
// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user