ef.js
ef.js copied to clipboard
Add ability to distinguish `keyEvent.code`
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code https://en.wikipedia.org/wiki/Scancode
Though we cannot get the scancode directly from browser, we can still access the similar information at keyEvent.code
. For example, 13
, but the keyEvent.code
gives out differently with Enter
and NumpadEnter
. While Chrome and Firefox act differently on some keys according to MDN, supporting this feature still needs a well discussion or design.