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

Add support for event.code #92

Open
Tracked by #74
theinterned opened this issue Sep 14, 2023 · 0 comments
Open
Tracked by #74

Add support for event.code #92

theinterned opened this issue Sep 14, 2023 · 0 comments

Comments

@theinterned
Copy link
Contributor

theinterned commented Sep 14, 2023

While it may prove impossible to smooth over all OS / keyboard layout differences in event.key, providing access to mapping hotkeys to an event.code may help in some situations (for example WASD navigation)

VS Code allows this via wrapping the code in []: for example [KeyA] would match on event.code === "KeyA".

This allows for some flexibility to map shortcuts to physical locations on the keyboard (eg WASD navigation etc.)

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

No branches or pull requests

1 participant