Keycode info
Press any key to see its JavaScript key, code, keyCode and modifiers.
Loading tool…
About the keycode info
Press any key and see exactly what a JavaScript keyboard event reports: the key value, the physical code, the deprecated keyCode and which modifiers were held. Essential when wiring up shortcuts that must work across keyboard layouts.
Frequently asked questions
Should I use key or code?
Use key when you care about the character produced, and code when you care about the physical position. WASD movement needs code, or the shortcut moves under a French or Dvorak layout.
Why is keyCode deprecated?
It conflated layout and position, and browsers never agreed on its values. It still works for compatibility, but key and code are the specified replacements and behave predictably.