-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
when i press q, will print
press q
ctrl-q
`package main
import (
"fmt"
"github.com/MakeNowJust/hotkey"
hook "github.com/robotn/gohook"
)
func main() {
hook.Register(hook.KeyUp, nil, func(e hook.Event) {
if hook.RawcodetoKeychar(uint16(e.Rawcode)) == "q" {
fmt.Println("press q")
}
})
hook.Register(hook.KeyUp, []string{"q"}, func(e hook.Event) {
fmt.Println("q")
})
hook.Register(hook.KeyDown, []string{"q", "ctrl"}, func(e hook.Event) {
fmt.Println("ctrl-q")
})
s := hook.Start()
<-hook.Process(s)
}`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
