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

KeyboardEvent.keyCode deprecated #19

Open
Wyzix33 opened this issue Apr 15, 2019 · 1 comment
Open

KeyboardEvent.keyCode deprecated #19

Wyzix33 opened this issue Apr 15, 2019 · 1 comment

Comments

@Wyzix33
Copy link

Wyzix33 commented Apr 15, 2019

According to MDN, we should most definitely not be using the .keyCode property. It is deprecated:

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

On W3 school, this fact is played down and there is only a side note saying that .keyCode is provided for compatibility only and that the latest version of the DOM Events Specification recommend using the .key property instead.

Will this library be updated to use KeyboardEvent.key?
Thanks

@piranha
Copy link
Owner

piranha commented Apr 15, 2019

It should be updated to code rather than key (so that key bindings work when layouts are switched, which is one of the main reasons to use keyCode), but it's quite a bit of work. I guess I'll get to it sometime, but if anybody wants to write a patch I'd be really happy. :-)

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

2 participants