Keyboard Event Viewer
Visualize JavaScript keyboard events. Press any key to see its key code, code, location, and modifier states.
Press any key to start
Recent History
| Key | Code | KeyCode | Time |
|---|---|---|---|
| No history yet | |||
Keyboard Event Viewer
The Keyboard Event Viewer (often called a Keycode Finder) is a developer utility that displays real-time information about any key you press on your keyboard.
Understanding the Data
- event.key: The value of the key pressed. For example, pressing "a" yields
"a", while pressing Shift+"a" yields"A". - event.code: The physical key on the keyboard. This ignores the keyboard layout. For example, the "Q" key on a QWERTY keyboard will always return
"KeyQ", even if the layout is set to AZERTY. - event.keyCode: A numeric code representing the key. Note: This property is deprecated in modern web standards but is still widely used in legacy code.
- event.location: Indicates where the key is located on the keyboard (e.g., Standard, Left Modifier, Right Modifier, Numpad).
Why use this tool?
Web developers use this tool to debug keyboard shortcuts, build games with custom controls, or ensure accessibility features work correctly across different keyboard layouts and devices.