We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
KeyEsc
This is on macOS 14.15 go 1.22 at least.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In a loop I am just printing the keys:
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.
The text was updated successfully, but these errors were encountered: