JavaScript Keycode Info
Press any key to inspect its modern and legacy JavaScript keyboard event values.
How to use
Click anywhere in the tool, then press a key. The large keycap shows what the browser reports while the detail cards expose event.key, physical event.code, legacy numeric values, location, modifiers and repeat state. Copy either condition directly into a keyboard handler. The ten most recent keydown events remain in the history table until you clear them. Browser and keyboard layout differences can affect key while code follows the physical key position.
FAQ
What is the difference between key and code?
key is the interpreted character or action and follows the active keyboard layout. code identifies the physical key position.
Should I still use keyCode or which?
They are deprecated and shown only for debugging older code. Prefer event.key or event.code in new applications.