-
Notifications
You must be signed in to change notification settings - Fork 59
repeated KeyArrowDown/KeyArrowUp create a KeyEsc #41
Copy link
Copy link
Open
Description
In a loop I am just printing the keys:
if err := keyboard.Open(); err != nil {
panic(err)
}
defer keyboard.Close()
for {
_, key, err := keyboard.GetKey()
if err != nil {
panic(err)
}
if key == keyboard.KeyEsc {
fmt.Print("esc")
break
} else if key == keyboard.KeyEnter {
fmt.Print("enter")
break
} else if key == keyboard.KeyArrowDown {
fmt.Print("down")
} else if key == keyboard.KeyArrowUp {
fmt.Print("up")
}
}
downdowndowndowndowndowndownesc
When I press the arrow keys to fast it creates a KeyEsc that was never pressed.
This is on macOS 14.15 go 1.22 at least.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels