Keyboard Key Test

This workspace combines the visual keyboard with a detailed event sheet and a per-key counter. Press each key once and read exactly what the browser reports.

Mobile note: This tool needs a physical keyboard. On a touch device you can still read the explanations, but no key events can be captured.
Key Detail
Ready

Recorded keys

Local
event.key Waiting
event.code Not recorded
modifiers None

Privacy: key events are processed only in this tab and are never transmitted. Counts clear on reset or reload.

About this test

Key means the produced character

event.key is the character or function name the browser produces. On a different layout the same physical key can produce a different key value.

Code means the physical position

event.code names the physical position such as KeyA or ShiftLeft. It stays stable across layouts and is the best label for hardware diagnosis.

Modifiers change the reading

Hold Shift, Ctrl, Alt, or Meta and press a letter to see the modifier state. Some combinations are reserved by the browser and will never reach the page.

What does event.key show for Space?

It displays "Space" with a note that the value is a single space character.

Why is event.key blank for some keys?

Media keys, Fn keys, and some system-reserved keys may produce an empty value or no event in a browser.

What is the difference between event.code and event.key?

event.code represents the physical key position, like KeyA, while event.key is the character produced, such as 'a' or 'A'. This distinction helps identify keys regardless of keyboard layout or modifier state.

How does the tool detect simultaneous key presses?

Press multiple keys at once and each one updates independently in real time. The tool shows each key's modifiers, location, and press count, letting you check rollover and confirm all keys register correctly.

What does the 'location' value indicate?

Location identifies which physical area of the keyboard the key came from: 0 is standard, 1 is left modifier, 2 is right modifier, and 3 is the numpad. This is useful for distinguishing left Shift from right Shift or Ctrl.