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, Enter and NumpadEnter both give out a key code of 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.
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, Enter and NumpadEnter both give out a key code of13, but thekeyEvent.codegives out differently withEnterandNumpadEnter. While Chrome and Firefox act differently on some keys according to MDN, supporting this feature still needs a well discussion or design.