-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
- Gohook version (or commit ref):
- Go version: go1.19.1
- Gcc version: 12.2.0 (Rev6, Built by MSYS2 project)
- Operating system and bit: windows/amd64
- Resolution:
- Can you reproduce the bug at Examples:
- Yes
- Provide example code:
package main
import (
"fmt"
hook "github.com/robotn/gohook"
)
func main() {
// out: alt-q
hook.Register(hook.KeyDown, []string{"alt", "q"}, func(e hook.Event) {
fmt.Println("alt-q")
})
// out: no output
hook.Register(hook.KeyDown, []string{"up"}, func(e hook.Event) {
fmt.Println("up")
})
// out: no output
hook.Register(hook.KeyHold, []string{"left"}, func(e hook.Event) {
fmt.Println("left")
})
// out: no output
hook.Register(hook.KeyUp, []string{"down"}, func(e hook.Event) {
fmt.Println("down")
})
s := hook.Start()
<-hook.Process(s)
}- Log gist:
Description
I'm sure there is nothing wrong with the keyboard, the following code prints out the keys normally
hook.Register(hook.KeyUp, []string{}, func(e hook.Event) {
fmt.Println(e)
})...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels