KeyboardEvent Value (keyCodes, metaKey, etc)

When a KeyboardEvent fires, you can test which key was pressed because that event contains information you can write logic against. For example, by pressing a, you’ll get 65. Apparently it’s best to write logic against which, as keyCode and charCode are complicated: The event.which property normalizes event.keyCode and event.charCode. It is recommended to watch … Continue reading KeyboardEvent Value (keyCodes, metaKey, etc)