Keyboard Keycode Event Finder
Press any key on your keyboard to inspect its event properties. Useful for programming key handlers.
Press any key to test
Click inside this card and press key
Understand Browser Keyboard Events
Key vs Code Parameters
In JavaScript keyboard events, event.key represents the character printed by the keypress (accounting for modifier layouts, so pressing 'a' returns 'a' but Shift+'a' returns 'A'). Conversely, event.code yields the physical key layout location on the hardware board (e.g. 'KeyA' or 'Digit1'), staying constant regardless of keyboard languages.
The Legacy Event properties
Properties like event.which and event.keyCode are deprecated in modern W3C specifications. However, many legacy codebases and cross-browser frameworks still reference them. This tool translates both systems.
Experiencing an issue with Keycode Event Finder?
Notice a bug, calculation error, or unexpected result? Let us know.