mirror of
https://github.com/robotn/gohook.git
synced 2025-04-27 22:49:42 +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://circleci.com/gh/cauefcr/ghook)
|
||||||

|

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