Skip to content
New issue

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

Suppress repeating hotkey presses #473

Closed
4 tasks done
CryZe opened this issue Nov 8, 2021 · 4 comments · Fixed by #584
Closed
4 tasks done

Suppress repeating hotkey presses #473

CryZe opened this issue Nov 8, 2021 · 4 comments · Fixed by #584
Labels
enhancement An improvement for livesplit-core. feature A new user visible feature for livesplit-core. hotkey This is about the hotkey implementation. suitable for contributions The issue is suitable those who are contributing to livesplit-core.

Comments

@CryZe
Copy link
Collaborator

CryZe commented Nov 8, 2021

It seems like on most platforms our hotkeys currently repeat when you keep the key pressed.

  • Windows (There's no way to differentiate, we probably have to track the pressed, released status ourselves)
  • Linux (Easy to deal with on evdev)
  • macOS (The event has a EventField::KeyboardEventAutorepeat field that we need to take into account)
  • Web (The event has a repeat field that we need to take into account)
@CryZe CryZe added enhancement An improvement for livesplit-core. suitable for contributions The issue is suitable those who are contributing to livesplit-core. feature A new user visible feature for livesplit-core. hotkey This is about the hotkey implementation. labels Nov 8, 2021
@CryZe
Copy link
Collaborator Author

CryZe commented Jan 15, 2022

TIL, keyboards themselves actually emit the repeats which somewhat explains why the low level keyboard hook in Windows doesn't track this for us.

It's called the typematic delay and rate and can be controlled by the host: https://wiki.osdev.org/PS/2_Keyboard

@DarkRTA
Copy link
Contributor

DarkRTA commented Jan 15, 2022

This only applies to PS/2 Keyboards. USB Keyboards don't implement this and leave it entirely up to the OS.

@CryZe
Copy link
Collaborator Author

CryZe commented Jan 15, 2022

Sure, but I assume the low level keyboard hook API is old enough (just like all the other keyboard related stuff) that it's based on PS/2.

@TheTedder
Copy link
Contributor

This is pretty important for me considering I use a PS/2 keyboard!

@CryZe CryZe linked a pull request Oct 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement for livesplit-core. feature A new user visible feature for livesplit-core. hotkey This is about the hotkey implementation. suitable for contributions The issue is suitable those who are contributing to livesplit-core.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants