Keyboard Event Viewer

Press any key to inspect its event properties.

Ad
Click here, then press any key
key
-
code
-
keyCode
-
which
-
location
-
repeat
-
Shift Ctrl Alt Meta

Event History

key code keyCode location modifiers
Ad

Frequently Asked Questions

What is the difference between key and code? +
The "key" property returns the character produced by the key press (e.g. "a" or "A"), while "code" returns the physical key on the keyboard (e.g. "KeyA") regardless of modifier state or keyboard layout.
Why is keyCode deprecated? +
The keyCode property is deprecated because its values are inconsistent across browsers and keyboard layouts. The modern replacement is the "key" and "code" properties, which are standardized and predictable.
What does the location value mean? +
Location indicates where on the keyboard the key is. 0 means standard, 1 means left (e.g. left Shift), 2 means right (e.g. right Shift), and 3 means numpad.
Which event types does this tool capture? +
This tool captures keydown events. It displays the full event object properties including key, code, keyCode, which, location, and all modifier states (Shift, Ctrl, Alt, Meta).
Ad