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).
DEVELOPER & HARDWARE UTILITIES · UI EVENTS
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.
// Press any key or shortcut to generate // a ready-to-paste keydown listener.
UI EVENTS REFERENCE
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).
Check event.location to distinguish Standard (0), Left (1), Right (2), and Numpad (3) keys when building custom shortcut handlers.
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.
Also check your controller with Gamepad & Controller Tester, or test audio/video gear with Microphone Level Test and Webcam Resolution Test.
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.
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.
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.
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.
No. All keyboard events stay strictly inside your browser tab memory and are cleared when you click Reset or close the page.