Skip to content
Jellykit

Keyboard Event Inspector

Press any key to see its key, code, keyCode, location and modifier state, with a live keyboard diagram and an event log.

  • Runs on your device
Loading tool

About Keyboard Event Inspector

When a shortcut does not fire or a key behaves differently on someone else’s keyboard, you need the exact values the browser puts in the KeyboardEvent. Focus the box and press a key: the page shows key, code, the deprecated keyCode and which, the location (left, right or numpad), the modifiers held, repeat, isComposing and Caps Lock.

Each press is also written as a shortcut, such as Ctrl + Shift + K, and as a JavaScript condition you can paste into a handler. A keyboard diagram shows which physical keys are held, and a log keeps the latest 50 events so you can compare sequences.

How it works

  1. The box listens for keydown and, if you switch it on, keyup. The values are read straight from each event and nothing is typed into the page.
  2. Keys pressed in the box are stopped from reaching the page, which holds back most browser shortcuts. Tab is let through so you can always move on, and the operating system keeps some combinations, such as switching apps, for itself.
  3. The diagram is a US layout located by event.code, the physical key, so it lights the same place whatever language your keyboard types.

Questions

What is the difference between key and code?

key is what the key produces with the current layout and modifiers, such as “a”, “A” or “Enter”. code names the physical key position as on a US keyboard, such as “KeyA”, whatever layout is active. Use code for game-style controls and key for text-related shortcuts.

Should I still use keyCode?

No. keyCode and which are deprecated and their numbers vary between layouts and browsers, but they are shown because older code still relies on them and you may need to match it.

Why does a phone show “Unidentified” or keyCode 229?

On-screen keyboards and input methods for languages such as Japanese compose text before handing it over, and the browser does not say which key was touched. Physical keyboards report real values.

Is anything I type recorded or sent?

No. Events are kept in memory only for the log on this page, at most 50 of them, and are gone when you clear the log or leave the page.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.