mirror of
https://github.com/robotn/gohook.git
synced 2024-12-03 19:36:54 +08:00
Update README.md
This commit is contained in:
parent
6ca4fbe91a
commit
0fa5a96dfe
14
README.md
14
README.md
@ -17,6 +17,20 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("--- Please press ctrl + shift + q to stop hook ---")
|
||||
hook.Register(hook.KeyDown, []string{"q", "ctrl", "shift"}, func(e hook.Event) {
|
||||
fmt.Println("ctrl-shift-q")
|
||||
hook.End()
|
||||
})
|
||||
|
||||
fmt.Println("--- Please press w---")
|
||||
hook.Register(hook.KeyDown, []string{"w"}, func(e hook.Event) {
|
||||
fmt.Println("w")
|
||||
})
|
||||
|
||||
s := hook.Start()
|
||||
<-hook.Process(s)
|
||||
|
||||
EvChan := hook.Start()
|
||||
defer hook.End()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user