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.
How to Use Keycode Event Finder
Press Any Keyboard Key
Press any physical key on your keyboard inside the testing window.
Instant Event Inspection
View `event.key`, `event.code`, `event.keyCode`, `event.which`, and `location` parameters.
Check Modifier States
Inspect active modifier toggles (`Ctrl`, `Alt`, `Shift`, `Meta / Cmd`).
Copy JS Event Listener Code
Copy ready-to-use JavaScript event listener code snippets for your web app.
Key Features & Capabilities
- Real-time `event.key`, `event.code` & `event.keyCode` display
- Modifier key state detection (Ctrl, Shift, Alt, Meta)
- Interactive physical keyboard visualizer
- Copy JS event listener code snippets
- 100% private client-side browser inspection
100% Client-Side Privacy: All operations occur locally in your web browser memory using JavaScript and WebAssembly. Your files, text payloads, and images are never uploaded to external servers or stored in cloud databases.
Frequently Asked Questions
View All Platform FAQsWhy is event.keyCode deprecated in modern web browsers?
W3C specifications deprecated `event.keyCode` in favor of standard `event.key` (character value) and `event.code` (physical key position) to ensure reliable international keyboard support.
Can I inspect mobile soft keyboard key events?
Yes. Mobile touch keyboards trigger standard input events, though physical code values match virtual key mappings.
Experiencing an issue with Keycode Event Finder?
Notice a bug, calculation error, or unexpected result? Let us know.