mirror of
https://github.com/robotn/gohook.git
synced 2025-06-06 10:37:54 +08:00
actually for real new stuff
This commit is contained in:
parent
1d180ffb5a
commit
d5e965f25c
14
README.md
14
README.md
@ -20,8 +20,16 @@ import (
|
||||
func main() {
|
||||
EvChan := hook.Start()
|
||||
defer hook.End()
|
||||
for ev := range EvChan {
|
||||
fmt.Println(ev)
|
||||
}
|
||||
// drawing := false
|
||||
|
||||
hook.Register(hook.KeyDown, []string{"alt", "p"}, func(e hook.Event) {
|
||||
fmt.Println("alt-p ", e)
|
||||
})
|
||||
|
||||
hook.Register(hook.KeyDown, []string{}, func(e hook.Event) {
|
||||
fmt.Println(e.Keycode)
|
||||
})
|
||||
|
||||
<-hook.Process(EvChan)
|
||||
}
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user