Home / Device & Media Tools / Key Code Tester
Device & Media Tools

Key Code Tester

Press keys to inspect KeyboardEvent values and copy a live event history for debugging or hardware checks.

Press any keyKeyboardEvent values will appear here.
—event.key
—event.code
—Location
NoRepeat

Key Code Tester: KeyboardEvent & Shortcut Audit

Inspect KeyboardEvent key, code, location, repeat and modifiers with shortcut-ready JavaScript and recent-event diagnostics.

Browser-local does not mean laboratory measurement

These pages can report Web API data such as events, stream settings, frame timing and audio samples. They do not certify hardware condition or bypass browser and operating-system limits.

Modern KeyboardEvent fields are distinguished from legacy compatibility fields

event.key, event.code, location, repeat and modifiers remain primary. keyCode/which are explicitly labeled legacy/deprecated rather than presented as equally authoritative identifiers.

Practical guide and verification

Use key and code for different questions

KeyboardEvent.key describes the interpreted key value while KeyboardEvent.code describes the physical key position. Layout changes can alter key without changing code, which matters for shortcuts, games, and international keyboards.

Read location for duplicated keys

Keys such as Shift, Control, Enter, and numeric keypad keys can have location information that distinguishes left, right, or numpad positions. Do not rely only on the visible key label when physical placement matters.

Repeat events are not new physical presses

Holding a key can produce repeated keydown events after the operating system’s repeat delay. Check the repeat flag before counting every event as a separate physical action.

Legacy numeric keyCode is compatibility evidence only

Modern code should prefer key and code. Numeric keyCode values are retained by some browsers for older software but are deprecated and can be inconsistent across layouts or event types.

Browser events cannot certify keyboard hardware

The tester shows events delivered to the page. Firmware, USB polling, OS remapping, accessibility settings, browser shortcuts, and focus rules can all affect what arrives, so use the result as browser-level diagnostic evidence.

Search by task, tool name, or category. Press Esc to close.
Start typing to find a tool.