KeyInfo
The fields of a KeyboardEvent for one key.
Properties
Section titled “Properties”key:
string
KeyboardEvent.key: ’ ’, ‘Enter’, ‘ArrowLeft’, ‘a’…
code:
string
KeyboardEvent.code: ‘Space’, ‘Enter’, ‘ArrowLeft’, ‘KeyA’…
keyCode
Section titled “keyCode”keyCode:
number
Legacy, still read by many games.