Press any key on your keyboard

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.

v1.0