Keyboard event inspector for Mac key codes and IME input

See the event behind a key press. Compare physical codes, typed values, modifier states and input-method composition in one focused debugging view.

Private. In your browser.

Inspect key, code, composition & modifier events

Focus the input, press a key or use an IME. See the events this browser actually receives.

Paused. Focus the input to resume.; 0 events observed; latest 200 retained

key
—
code
—
location
—
keyCode (legacy)
—
Last keyboard event
—
repeat
—
isComposing
—
defaultPrevented
—
⌘ MetaControl⌥ AltShiftCapsLockAltGraph
No events in this view. Press a key in the input above.

Tab leaves the input; Escape pauses. System shortcuts, Fn/Globe and Touch ID may never reach a web page. key follows the input layout; code identifies the physical position. location 1/2/3 means left/right/numpad. keyCode is deprecated and shown for legacy debugging. Logs stay on this page. Avoid entering passwords.

Worked example

Illustration only Not a recorded test or hardware benchmark

See why key can change while code stays the same

With the US input source selected and Caps Lock off, focus the inspector and press E once, then Shift+E. The export can retain sample letters and other text you enter.

See why key can change while code stays the same
Action or inputIllustrative observation
Press E without modifiersA typical keydown has code KeyE, key e and an empty modifier list.
Press the same position with Shift heldThe code remains KeyE, key becomes E and Shift appears in the modifier list.

What this means

The same physical position delivers one code and two key values. Use the modifier column to account for the changed character. The event filter changes the visible rows, while exports retain the latest 200 events across all types.

Avoid this conclusion

The deprecated numeric keyCode is not a direct electrical scan-code reading. IME and dead-key input can produce other values and sequences; this view only records events delivered to its focused field.

Continue the check

Compare unmodified letter positions

Clear the log, capture the unexpected input once and switch between keyboard and text events. Compare the delivered code with the committed text. If the same code produces an unexpected base letter without modifiers, check the layout reference.

Inspect KeyboardEvent.key versus KeyboardEvent.code on Mac

Focus the capture area and press the same key with and without Shift or Option. The key value reflects the current layout and modifiers; code describes a physical key position. A different printed character is not automatically a broken key. Use the event log to compare the values.

Check left and right modifiers and keyboard event sequences

Press and release one key, then try a modifier with a letter. Compare keydown and keyup entries, location, repeat and modifier flags. Browser-reserved or macOS shortcuts may interrupt the sequence. A missing keyup after a focus change is not enough to diagnose a stuck switch.

Observe Chinese input-method composition events

With a Chinese input method active, compose a short sample in the input area and commit it. Composition events and isComposing help explain why a keyboard event and final text are different. Event order and values vary by browser and input method; use the final committed text as a separate observation.

Keep a useful local keyboard event debugging record

Clear the log before a small reproduction case, choose the relevant event type and inspect the resulting sequence. Copy or download a local report when you need to compare sessions. Logs can contain typed characters or composition text: use samples and review the report before sharing.

Sources and further reading

Official documentation supporting this page’s explanations and service disclosures.

Mac keyboard test, explained.

About the test, your keyboard, and that one key that won’t light up.

More answers
How is this different from the Mac keyboard tester?

The main tester answers which keys reach the browser and shows a physical map. The inspector focuses on event properties and sequences for layout, modifier and input-method debugging, rather than key-completion scores.

Does a physical code always match the character on my keycap?

No. KeyboardEvent.code describes a key position; KeyboardEvent.key depends on the layout and modifier state. Remapping, unusual devices and browser support can also affect delivered values.

Can this inspect text or shortcuts in other applications?

No. The inspector only records input directed to its focused input area; it cannot monitor other applications or override all system shortcuts. Do not enter passwords or private information here: copied JSON and downloaded JSON or CSV can contain raw key values, typed text and input-method composition text.

Get to know your keyboard a little better.

From missed keys to double taps. Find the right Mac keyboard test for the job.

Your keystrokes stay on your Mac.

Tested in your browser. No accounts, no keystroke uploads, no fuss.

Our privacy promise