Press any key on your keyboard
event.key
event.code
event.which (Deprecated)
event.location
Control
Alt
Shift
Meta
Common Questions (FAQ)
What is event.key?
The value of the key pressed, accounting for modifiers (e.g. Shift) and keyboard layout.
What is event.code?
Represents the physical key on the keyboard. It ignores layout language.
Why is event.which deprecated?
It is non-standard and inconsistent. Use event.key or event.code instead.