Skip to content
TabKiwiTabKiwi

Keyboard Inspector

Press any key to see its key, code, keyCode, location and modifiers, plus a list of common shortcuts.

DeveloperRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Building a shortcut handler or a game control scheme means knowing exactly what the browser reports for each key. Press keys in the capture box to see event.key, event.code, the legacy keyCode, the key location (left, right or numpad), modifier states and auto-repeat, with a running history and the keys currently held down. It also doubles as a quick check for a sticky or dead key, and includes a reference table of everyday shortcuts for Windows and macOS.

How to use Keyboard Inspector

  1. Click the capture box to focus it.
  2. Press a key or key combination.
  3. Read the event properties and the history table.
  4. Switch the shortcut table between Windows and macOS.

Frequently asked questions

Should I use event.key or event.code?

Use key when you care about the character typed, which follows the user's keyboard layout. Use code for physical positions, such as WASD controls that should work on any layout.

Why do some shortcuts still trigger browser actions?

Browsers reserve a few combinations, such as Ctrl+W, Ctrl+T or Cmd+Q, and never pass them to web pages.

Is keyCode still safe to use?

It is deprecated and its values depend on browser and layout. It is shown only to help with older code.

More Developer tools

View all 91 →