piranha/keymage

KeyboardEvent.keyCode deprecated

Wyzix33 opened this issue · 1 comments

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

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. :-)