How to use it
- Click the grey area so that it has focus.
- Press each key. A key lights up while it is held and keeps a tint once pressed.
- Hold three keys together, for example Q, A and W, and read Most keys held at once and Rollover check.
- Check the table for event.key and event.code. Press Reset to start again.
What the test shows
event.code names the physical key. The key in the A position is KeyA on every layout, and the name does not change when the keyboard language changes. event.key is the character or name the system produces with the current layout, so it does change with the language.
- event.code: the physical key, for example KeyA or Digit2.
- event.key: what the key produces, for example a or A, depending on Shift and the layout.
- location: whether the key is on the left or right of the keyboard, or on the numeric keypad.
- repeat: yes when the key is still held and the system sends it again.
Layouts on the picture
ANSI (US) has a short Enter key and a Backslash key at the top right. ISO has a tall Enter key and an extra key left of Z. Turkish Q uses the ISO shape with Turkish letters: ı sits where I is on the US keyboard, and ğ, ü, ş, i, ö and ç sit after P, after Ğ, after L, after Ş, after M and after Ö. AZERTY (French) uses the ISO shape with the letters moved: A sits where Q is on the US keyboard, Z where W is, Q where A is, W where Z is, and M after L. Its digits need Shift. QWERTZ (German) uses the ISO shape with Y and Z swapped, and Ü, Ö, Ä and ß sit after P, after L, after Ö and after 0. ABNT2 (Brazilian) uses the ISO shape with Ç after L, an apostrophe key left of 1, and an extra key next to right Shift that types / and ?. The printed letters shown are the usual legends; the keycaps on your keyboard may differ.
The codes do not change with the layout. The code names the place of a key on the US keyboard, so the key that prints A on AZERTY still has the code KeyQ, and event.key shows the A.
Rollover and ghosting
Rollover is how many key presses a keyboard reports at the same time. A keyboard with full rollover reports every key you hold. A cheaper keyboard can drop a key when several keys are pressed in a certain pattern, which is called ghosting. To check, hold three or more keys, such as Q, A and W, and watch that all of them light up.
Example: the I key on a Turkish Q keyboard
On a Turkish Q keyboard the key in the US I position prints ı. Pressing it gives event.code KeyI and event.key ı. With Shift held, event.key becomes I. The key position and the code stay the same; only the character changes with the layout.
Frequently asked questions
Does the test record what I type?
No. The page reads key events only while the test area has focus, shows them on the screen and drops them when you reset the test or leave the page. Nothing is sent to our server or saved in the browser.
Why does a key not light up?
Some keys are used by the system or the browser before the page sees them, such as Ctrl+W, Alt+Tab or the Windows key. Try the key in another application: if it lights up there, the page cannot see it in the browser.
What does the rollover check show?
It shows whether three or more keys were reported together during this test. If a key stops lighting up while you hold three keys that form a corner or a rectangle, the keyboard may have ghosting.
Why does event.key change when I switch the keyboard language?
event.key is the character the system produces with the current layout, so the key in the I position gives ı on a Turkish layout and i on an English one. event.code stays the same because it names the physical key.
Does the test work on a phone?
Little on a phone: the on-screen keyboard does not send physical key codes in the same way. Use a computer with a hardware keyboard for a full test.
Sources
- UI Events KeyboardEvent code values, W3C specification
- UI Events KeyboardEvent key values, W3C specification
- KeyboardEvent, MDN Web Docs
- Microsoft Learn: French (Legacy, AZERTY) Keyboard
- Microsoft Learn: German Keyboard
- Microsoft Learn: Portuguese (Brazil ABNT2) Keyboard
- Keyboard Layout Info: KBDBR shift states, the key next to right Shift
Figures and text last checked on Thursday, November 12, 2026.