What This Page Does
This page is a single-screen input monitor. It draws a full US-arrangement keyboard and reacts to every key the browser reports while the page has focus. Nothing is installed, and presses are not sent anywhere.
Each keypress triggers three things:
How a Keypress Becomes a Highlight
The script attaches one document-wide keydown listener. For most keys it reads the numeric code and uses it as a CSS class, so a matching key lights up. Three cases are handled before that lookup:
- Dual codes for punctuation. Minus, equals, semicolon and a few other symbols are tagged with both the modern and the older number. Some browsers historically sent the older one, so either value lights the key.
- Left and right modifiers. Shift, Control, Alt and the Windows or Command keys report the same number on each side. The script switches to the physical key name for these, so the correct side lights up.
- Colliding codes. Enter, numeric Enter, the numeric decimal key and the context-menu key are also resolved by physical name, because their numbers would otherwise select the wrong key.
Keys that are on the board but carry no code, such as Print Screen, add no highlight and no text. The script also calls preventDefault on every keydown, so Space will not scroll and Tab will not move focus while the page is open. Some browser and system shortcuts are handled before the page ever sees them, and those will not appear here at all.
Reading Odd Results
Check this table before blaming the switch:
| Observation | Probable Explanation | Next Step |
|---|---|---|
| A key never lights and never appears in the transcript | The browser or operating system did not deliver the event, or the key has no entry on this board | Try the key in a plain text field in another program. If it fails there too, suspect the keyboard or its connection |
| A key lights up but the wrong character appears | The code follows the character your OS layout produces | Compare the OS layout with the labels on your keyboard, then read the Layouts section |
| One press adds two characters | Either the switch is bouncing or the OS repeat delay is short, and both can send a second keydown | Press once, slowly. If the characters arrive almost together, try another USB port or adjust the repeat settings in your OS |
| Holding a key floods the transcript | Auto-repeat is not filtered, so every repeat adds a character | Expected for a held key. If characters keep arriving with nothing held, the switch may be stuck, and cleaning or replacing it is the next step |
| Several keys in one press do not light | Limited rollover on the keyboard, or filtering by the OS or browser, can drop keys | Repeat the combination on a second keyboard. One failure is a hint, not proof |
Layouts and Character Codes
Letter, digit and symbol keys report the code of the character your operating system layout produces, not the physical position. On AZERTY, Dvorak or Colemak, a press can light the US key carrying that character, which may sit elsewhere on the board.
Modifiers and Enter are read by physical name, and numeric keypad digits report fixed codes, so those areas are the most dependable checks on a non-US keyboard. With Num Lock off, a numpad press can light an arrow key instead, which is expected.
Checks This Page Supports
Before You Start a Run
A few habits keep the readout honest:
- Close key-grabbing software. Remapping utilities, macro tools and anything that intercepts keys globally change codes before the browser sees them.
- Keep the tester focused. Keep the tester tab in front and selected. Keys sent to another window never reach the page.
- Check Num Lock and Caps Lock first. Both change what the numeric keypad reports.
- Press once and release. Press each key once and let it go before the next, so the transcript stays readable.
- Reset between runs. Highlights and transcript persist until you clear them. The page also reloads itself after about 20 minutes without keyboard or mouse input, which clears them too.
Questions Visitors Ask
It checks whether the browser delivers a keydown event for each key you press, then highlights the matching key on the on-screen board and adds its label to the transcript. It does not measure anything else about the press.
The page only reacts to key down events. Its key up handler is commented out in the script, so a highlight stays until you press Reset or reload the page.
Keys that carry no numeric code on the board, such as Print Screen, cannot be matched. Keys that the browser or operating system never passes to a page are invisible too. In both cases nothing lights and nothing is added to the transcript.
Only indirectly. If you press several keys together and some never highlight, the cause could be the keyboard, the operating system or the browser, so repeat the test on a second keyboard before drawing a conclusion.
No. The browser does not report which device produced a keydown, so a laptop keyboard and an external keyboard look identical in the transcript.
Letter, digit and symbol keys are matched by the code of the character your operating system produces. The highlight can land on the US key that carries that character rather than the key in the same physical position.
What the Readout Does Not Measure
The page reports only that a key went down. Several properties people often expect from a tester are outside what the script records:
| Property | Why It Is Missing | Where to Check Instead |
|---|---|---|
| Key release | The keyup handler is commented out in the script, so a key stays lit after you let go | A dedicated hardware tester |
| Hold duration | No timer runs between keydown and keyup | A stopwatch-based key test |
| Source keyboard | Browsers do not identify which device sent a keydown | Operating system input settings |
| Ghosting as a fault | A missing highlight cannot separate keyboard limits from OS or browser filtering | Repeat the test on a second keyboard |
Repeated Characters and Auto-Repeat
The transcript cannot tell three sources of repeated text apart: a bouncing switch, the operating system's repeat stream while a key is held, and a stuck key that keeps firing after release. All three append text the same way, and the page flags none of them.
Press a key once and count the characters. Two characters that appear almost together suggest bounce. A stream that appears only while the key is held is normal repeat. Characters that keep arriving with the key untouched are worth acting on.