Keyboard diagnostics
How to test dead keys, ghosting, and keyboard rollover
A keyboard tester shows the events that reach the browser. A careful sequence can reveal missing keys and combination limits, but it cannot by itself prove whether hardware, firmware, the operating system, or the browser caused them.
Key takeaways
- Test one key at a time before testing combinations so the failure can be reproduced clearly.
- KeyboardEvent.key describes the interpreted value, while code identifies a physical-position code.
- Rollover describes simultaneous key reporting; ghosting describes missing or unintended results in combinations.
- System shortcuts, input methods, accessibility settings, firmware, and browsers can intercept events before a tester sees them.
What a browser keyboard tester can observe
A browser receives keydown and keyup events after the keyboard, firmware, operating system, input method, and browser have processed the input. A tester can display the event’s key, code, location, repeat state, and legacy keyCode, and it can mark recognized layout positions as they are pressed and released.
This is useful evidence, not a direct electrical test. If an event is missing, the cause may be a switch, matrix combination, wireless connection, driver, remapping utility, accessibility feature, system-reserved shortcut, or browser behavior.
Dead hardware keys and dead composition keys
“Dead key” can mean two different things. A failed hardware key produces no usable input when it should. A composition dead key is intentional: on some layouts, an accent key waits for the next character so the operating system can produce a combined letter. The event value may therefore be Dead or behave differently from an ordinary printable key.
Check the active keyboard layout before diagnosing a fault. Test the key alone in the browser tester, then in a plain text editor, and finally on another port, device, or operating-system profile when possible. Record whether keydown, keyup, or the resulting character is missing.
Understand key, code, location, and repeat
KeyboardEvent.key describes what the key means after modifiers and layout are applied. KeyboardEvent.code identifies a physical-position code such as KeyA or Digit1. location distinguishes standard, left, right, and numpad positions. A held key may emit repeated keydown events with repeat set to true before the final keyup.
Use code when testing whether a physical position reports consistently, and key when testing the character or command users receive. Neither field alone diagnoses the hardware because both are delivered after lower layers have interpreted the device input.
Test rollover and ghosting systematically
Rollover is the number and pattern of simultaneous keys a keyboard can report. Ghosting commonly describes a combination where a pressed key is missed or an unintended key appears because of matrix or processing limits. Marketing labels such as “6-key rollover” or “N-key rollover” should be checked against the actual connection mode and key combinations you use.
Hold two keys and add a third while watching the pressed state and recent-event history. Repeat across common gaming, shortcut, and typing clusters rather than testing only adjacent letters. Release keys in reverse order and confirm every keyup arrives; a visually stuck key can indicate a missing release event rather than a physically held switch.
- Test both left and right modifier keys.
- Repeat on USB, wireless, or Bluetooth modes if the keyboard supports them.
- Record the smallest failing combination and the order in which keys were pressed.
Function keys and shortcuts need extra care
The browser or operating system may reserve Tab, function keys, media keys, screenshots, navigation shortcuts, secure-attention sequences, or accessibility commands. A tester can prevent some default page actions when shortcut capture is enabled, but it cannot override system-reserved combinations.
Do not type passwords, recovery codes, or other secrets while testing. Use harmless keys and close applications where an accidental shortcut could delete data, send a message, or trigger another unwanted action.
Turn observations into a useful diagnosis
Write down the keyboard model, connection mode, operating system, browser, active layout, failing key codes, and exact combination order. Compare the same test in another browser and a plain text editor. If the failure follows the keyboard across devices, hardware or firmware becomes more likely; if it stays with one environment, software configuration deserves closer inspection.
A browser test cannot certify a keyboard or measure switch bounce, scan rate, latency, or electrical continuity. Use manufacturer diagnostics, firmware tools, another known-good keyboard, or professional repair testing when the distinction matters.
Primary sources
These standards and public-agency references support the factual guidance above. Links open at the original publisher.