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

stop using deprecated "keyCode", trigger hotkeys on keydown #1480

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

srabraham
Copy link
Member

This moves us over to "key" rather than "keyCode". The latter is deprecated and slated for removal from web browsers...some time.

This change does remove the "alt" option and instead requires "ctrl". Presumably no one will care. That was needed because key doesn't work as simply as keyCode when alt is held down (you get a "Dead" back instead). I doubt anyone will notice this, and I want to enhance hotkeys after this anyway (and document them in the frontend).

Finally, this switches to keydown rather than keyup. The former is more natural.

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode

This moves us over to "key" rather than "keyCode". The latter is
deprecated and slated for removal from web browsers...some time.

This change does remove the "alt" option and instead requires "ctrl".
Presumably no one will care. That was needed because key doesn't work
as simply as keyCode when alt is held down (you get a "Dead" back
instead). I doubt anyone will notice this, and I want to enhance
hotkeys after this anyway (and document them in the frontend).

Finally, this switches to keydown rather than keyup. The former is
more natural.

https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
@srabraham srabraham changed the title further simplify hotkey code, stop using deprecated "keyCode" stop using deprecated "keyCode", trigger hotkeys on keydown Jan 2, 2025
@srabraham srabraham enabled auto-merge (rebase) January 2, 2025 02:59
@srabraham srabraham merged commit 06ce62e into master Jan 2, 2025
11 checks passed
@srabraham srabraham deleted the 2024-12-17-lint branch January 2, 2025 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant