Press any key
Every key press is read anywhere on the page. Click the pad, or tab to it, to capture Tab, Space and the arrow keys too.
Related tools
- Keyboard Layout HeatmapShow per key press counts and finger load for any pasted text, compared across ten common keyboard layouts.
- Key Rollover TesterCheck N-key rollover and ghosting visually by holding down keys and watching a live diagram.
- Media Key TesterVerify Media Session action handlers and hardware media keys, and see whether your headset or keyboard buttons actually reach the page.
- Display InfoLive readout of your screen resolution, pixel density, refresh rate, color capabilities, and input features.
- Oryx Layout DifferDiff two ZSA Moonlander layouts key by key from their keymap.c files.
- Click Speed Test (CPS)Measure clicks per second over a 5, 10, 30, 60, or 100 second window, with a peak rate and a per second breakdown.
What it does
Shows what your browser really reports for a key press. Focus the capture pad, press any key or combination, and you get key, code, the legacy numeric keyCode and which, the active modifiers, the key location (standard, left, right, or numpad), whether the event is an auto-repeat, and a shortcut-style summary such as Ctrl+Shift+K. The last five distinct keys stay on screen as chips, so you can compare left Shift against right Shift, or a numpad digit against the row above it.
How to use it
Click the capture pad or tab to it, then press the key you want to inspect. While the pad has focus it swallows Tab, Space, and the arrow keys so you can read them instead of moving the page; press Escape or click away to hand those keys back to the browser. Click any recent-key chip to bring its readout back, and copy an individual field or the whole record with the buttons on the output.
Why this one
The usual keycode reference sites wrap a one-line readout in ad slots and only tell you the deprecated numeric code. This one reports the modern key and code fields alongside the legacy numbers, keeps a short history so you can compare two physical keys, runs entirely in your browser, and works offline after first load.
FAQ
- Why use event.code instead of event.keyCode?
- keyCode and which are deprecated legacy numbers that vary by layout and browser. code identifies the physical key position, so it is the same on QWERTY and AZERTY, and key gives the character actually produced. Modern code should read those two and treat the numbers as legacy only.
- What do the location values mean?
- They are the DOM_KEY_LOCATION constants: 0 is the standard part of the keyboard, 1 and 2 are the left and right copies of a duplicated key such as Shift or Control, and 3 is the numeric keypad. It is how you tell left Alt from right Alt.
- Why does one key press show as several events with Repeat set to yes?
- Holding a key down makes the browser fire keydown over and over at the operating system repeat rate. Every event after the first has repeat set to true, which is the flag to check when you want an action to run once per press rather than once per tick.