Online Tool Store Online Tool Store

Keyboard Event Tester

Press any key to inspect key, code, keyCode, location, modifiers, and repeat state, then copy one event or download the local JSON log.

This works right here on your device — nothing gets sent out.

Browser event inspector

Test your keyboard events

See exactly what your browser receives for each key, including its physical code and modifier state.

Ready to capture
Click here, then press any key
key
—
code
—
keyCode
—
location
—
Shift Ctrl Alt Meta Repeat
0 logged events

Event log

Nothing yet — key events appear here as you press and release keys.

How it works

  1. Click the focus box, then press any key on your keyboard.
  2. The box captures the browser's keydown and keyup events and reads their key, code, keyCode, and location properties.
  3. Active modifier keys (Shift, Ctrl, Alt, Meta) and the auto-repeat state light up while held.
  4. Every press and release lands in the event log below; copy the latest event or download the local log as JSON for debugging.

FAQ

What's the difference between key and code?

"key" reflects the character produced (affected by Shift and layout), while "code" reports the physical key position regardless of layout or modifiers — code is what you want for game controls.

Why is keyCode shown if it's deprecated?

keyCode is still returned by browsers and shows up in a lot of legacy code you might be debugging, even though key/code are the modern replacements.

What does the location value mean?

0 is a standard key, 1 is a left-side key (like left Shift), 2 is right-side, and 3 is the numeric keypad.

Is anything I type recorded?

No — key events are read directly from the browser's KeyboardEvent object and never stored or transmitted. The event log lives only in this page's memory and clears when you leave or click "Clear log".

What does the repeat indicator mean?

It reflects the KeyboardEvent.repeat property — true while a key is held down and the operating system is auto-repeating keydown events for it. It is not meaningful on release (keyup), only on keydown.

Why does the event log skip some keydown events?

Auto-repeat can fire dozens of keydown events per second while a key is held, which would flood the log. Only the initial press and every release (keyup) are logged; the live key/code/modifier display above still updates on every single event, repeats included.

How we compare

Feature Online Tool Store Toptal's keycode tool Browser console
Shows key, code, keyCode and location together ✓ ✓ ✗
Live modifier and auto-repeat indicators ✓ Modifiers only, no repeat ✗
Copy the raw event as JSON ✓ Shown, not copyable Manual, from a logged object
Event log of presses and releases ✓ ✗ (latest key only) ✓, if you add a listener
Download the recent event log as JSON ✓ Not usually available Manual, from a logged object
No console/devtools knowledge needed ✓ ✓ ✗

If you're wiring up keyboard shortcuts and need to confirm exactly what a browser reports for a key, this tester shows every relevant field at once.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.