Guide

DEVELOPER & HARDWARE UTILITIES · UI EVENTS

Keyboard Event Tester,
inspect key, code & rollover live.

Inspect JavaScript KeyboardEvent properties (event.key, event.code, event.location, modifiers, legacy keyCode), test N-key rollover (NKRO) on an interactive key map, detect mechanical key chatter, and copy ready-to-use JS shortcut listeners locally.

Held: 0 (Max NKRO: 0)Tested: 0 keys
Press any key
Press any physical key or shortcut — click any property card below to copy its value.
CTRLALTSHIFTMETAREPEATIME
Visual Key Map & Rollover Tester (Click a key to simulate)Blue = Held · Green = Tested
JavaScript Listener Snippet
// Press any key or shortcut to generate
// a ready-to-paste keydown listener.
Live Event Log (0)
No keystrokes captured yet.

UI EVENTS REFERENCE

Modern browser keyboard handling & hardware switch testing.

1. Prefer event.key or event.code

Use event.key when matching typed commands (like Escape or Enter) and event.code when binding physical positions (like KeyW / KeyA / KeyS / KeyD across AZERTY or Dvorak layouts).

2. Left vs. Right Modifier Locations

Check event.location to distinguish Standard (0), Left (1), Right (2), and Numpad (3) keys when building custom shortcut handlers.

3. NKRO & Switch Chatter Check

Hold multiple keys at once to verify keyboard rollover, test every key on the visual map to spot dead switches, and watch for <35ms double-firing chatter warnings.

Frequently Asked Questions

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

event.key reflects the character or logical meaning produced by the active keyboard layout and Shift state (for example, "A" vs "a" or "é"). event.code identifies the physical key position on a standard keyboard (for example, "KeyA" or "ShiftLeft"), making it ideal for game controls and layout-independent shortcuts.

How do I test Tab, Space, or Arrow keys without scrolling the page?

Check Prevent browser default (Tab / Space / Arrows) at the top of the tester. That calls event.preventDefault() on captured keystrokes so you can inspect navigation keys and combos without losing focus.

What is N-Key Rollover (NKRO) and mechanical key chatter?

N-Key Rollover measures how many simultaneous keys your keyboard hardware can register at once without ghosting—hold multiple keys to watch the Held / Max NKRO counter climb. Chatter detection flags double-registered keydowns under 35ms on worn mechanical switches.

Why is event.keyCode marked as legacy?

Numeric keyCode and which were deprecated in the W3C UI Events specification because values varied across browsers and layouts. Modern apps should check event.key or event.code instead.

Are my keystrokes recorded or sent to a server?

No. All keyboard events stay strictly inside your browser tab memory and are cleared when you click Reset or close the page.