Inspect keyboard events live — key, code, keyCode, modifiers. Free, private, runs in your browser.
100% private — your files and text never leave your browser. All processing happens locally on your device.
Press any key
Click here first if the capture area isn't focused.
This tool requires a physical or Bluetooth keyboard. On-screen keyboards fire limited events.
Press any key anywhere in the capture area and the tool reports every piece of data the browser provides about that event — modern standardized properties (`key`, `code`, `location`, modifier states, `repeat`) plus legacy ones (`keyCode`, `which`) that are deprecated but still referenced in old tutorials. Essential for building keyboard shortcuts, game controls, form navigation, or accessibility features.
`key` is what the user logically typed, respecting layout and modifiers: Shift+a produces key='A'; on a French AZERTY keyboard, the physical Q position produces key='a'. `code` is the physical key on the keyboard, layout-independent: both examples above produce code='KeyA'. Use `code` for gameplay where the position matters (WASD works regardless of layout). Use `key` for text input where the logical character matters.
Both are legacy Internet Explorer properties from before the W3C standardized keyboard events. Values varied between browsers (IE vs Gecko vs WebKit), sometimes between versions of the same browser, and between layouts. The UI Events spec introduced `key` and `code` as clean, documented alternatives — but `keyCode` and `which` haven't been removed because too much legacy code still depends on them. Use the modern properties for anything new.
The `location` property distinguishes left Shift from right Shift, left Ctrl from right, and Numpad keys from the main-row equivalents. Useful for games, accessibility tools, and anyone implementing chord-style shortcuts. The modifier booleans (`ctrlKey`, `altKey`, `shiftKey`, `metaKey`) tell you which modifiers were down at the instant the key was pressed. On Mac, `metaKey` is Command; on Windows, it's the Windows key.
`key` is what the user typed after layout and modifiers are applied (so Shift+a produces 'A'). `code` is the physical key position regardless of layout. Use `code` for gameplay and shortcuts, `key` for text input.
They're legacy IE properties with inconsistent cross-browser values. `key` and `code` are the modern replacements, defined by the UI Events spec and supported in every current browser.
Tab normally moves focus away from the capture area. Enable 'Prevent default' (on by default) so the tool intercepts keys like Tab, Enter, arrows, and Space before the browser handles them.