Skip to main content

Keyboard Event Logger.

A diagnostic dashboard showing raw browser keyboard events. Useful for developers debugging event handlers or checking specific key properties.

Log Controls

Real-time Events

EventKeyCodeKeyCodeLocationModifiersTimestamp
No keyboard events logged yet. Focus the capture target and press some keys.

Check these before you log

  • Focus the capture boxClick it or press Tab first — no events are logged until it's focused.
  • Clear between testsReset the log before each new key so duplicate-event checks stay easy to read.
  • Watch the timestampsTwo keydowns milliseconds apart from one tap point to a chattering switch, not a mistake.

How the event logger works

  1. 1

    Focus the capture area. Click the box above or press Tab to focus it. The status text changes to show it's listening for keyboard events.

  2. 2

    Press any keys. Each keydown and keyup event is logged with its raw properties — key, code, keyCode, location, modifiers, and timestamp. The table updates in real-time, with new events prepended at the top.

  3. 3

    Manage your log. Use the "Clear Logs" button to reset the table, or "Export as CSV" to download all events for analysis in a spreadsheet or debugging tool.

Understanding keyboard event properties

key is the actual character the key produces (e.g., "a", "A", "1"). It changes based on keyboard layout and whether modifiers (Shift, Alt) are active. On a French AZERTY keyboard, the leftmost letter key produces "a" instead of "q".

code is the physical key, independent of layout (e.g., "KeyA", "Digit1", "Enter"). Pressing the same physical key always returns the same code, regardless of layout or modifiers.

keyCode is a legacy numeric code (e.g., 65 for A) from before the modern key and code properties. It is now deprecated because it was browser-inconsistent and unreliable for international keyboards and special keys. Use code or key instead.

location distinguishes between duplicate keys on your keyboard. Standard keys report location 0; left modifiers (Shift, Ctrl, Alt) report 1; right modifiers report 2; numpad keys report 3. The logger displays these as friendly labels: "Standard", "Left (Mod)", "Right (Mod)", "Numpad".

Modifier flags are boolean properties — ctrlKey, shiftKey, altKey, metaKey — that indicate whether Ctrl, Shift, Alt, or Command/Windows was held during the event. They combine freely: pressing Ctrl+Shift+A sets both ctrlKey and shiftKey to true.

repeat is true when a held key fires repeated keydown events (auto-repeat). The first keydown has repeat: false; if you hold the key, subsequent keydowns have repeat: true. This logger displays only keydown and keyup, so you can spot repeating keys by watching for clustered identical entries.

Who the event logger is for

Debugging key handlers

Web developers building custom keyboard interactions can see exactly which events fire and in what order, and inspect the full event object properties to ensure handlers respond correctly to the keys your users press.

Detecting key chatter

A malfunctioning switch sometimes registers two keydown events from a single press (chatter). Watch the timestamps and you can spot rapid duplicates and trace them to a single physical key — a sign of hardware wear or a switch that needs attention.

Identifying unknown keys

Found a key on your keyboard with an unfamiliar label or media symbol? Press it here and read its code and key properties to understand what event it fires, or to map it in your application or gaming setup.

Verifying remapping and modifiers

Test keyboard remapping software or OS-level key bindings by logging events and confirming that pressed keys produce the expected code and modifier combinations. Check that AltGr and other international modifiers register correctly.

Keyboard event glossary

key
The character produced by the key press, affected by keyboard layout and modifiers — e.g., "a", "A", "1", "!", "é".
code
The physical key location, independent of layout — e.g., "KeyA", "Digit1", "Enter", "Space", always the same regardless of layout or modifiers.
keyCode (deprecated)
A legacy numeric code (e.g., 65 for A). Do not use in new code — it is inconsistent across browsers and does not work reliably with international keyboards.
location
The physical position of the key: 0 = standard, 1 = left modifier, 2 = right modifier, 3 = numpad. Distinguishes left Shift from right Shift, and numpad keys from regular keys.
repeat
Boolean flag that is true when a held key fires a repeating keydown event (auto-repeat). The first keydown is false; subsequent ones are true if the key remains pressed.
Modifier flags (ctrlKey, shiftKey, altKey, metaKey)
Boolean flags indicating whether Ctrl, Shift, Alt, or Command/Windows was held during the event. Multiple flags can be true simultaneously for key combinations.

Keyboard event logger FAQ

What's the difference between key and code?

key is the actual character produced by the keyboard (e.g., 'a', 'A', '1', '!'), which depends on your keyboard layout and whether modifiers like Shift are held. code is the physical location of the key (e.g., 'KeyA', 'Digit1'), independent of layout and modifiers — pressing the same physical key in different regions always returns the same code. For international keyboards, code stays constant while key changes.

What is keyCode and why is it deprecated?

keyCode is a legacy numeric code assigned to each key (e.g., 65 for the A key). It was used before the modern key and code properties and is deprecated because it was inconsistent across browsers and does not work reliably with international keyboards or special keys. Use code for the physical key location and key for the character produced instead.

How do I detect key chatter (a key that registers twice)?

Key chatter happens when a single keypress produces two or more keydown events without an intervening keyup. Check the logger for rapid duplicate keydown entries with the same code and a very small time difference (usually under 50ms). If a key consistently chatters, it may be a hardware issue with that switch. Some keyboards or drivers can be configured to debounce; consult your keyboard's firmware or software.

Does the logger save or upload my keystrokes?

No. All logging happens entirely in your browser. Nothing you type is sent to a server, uploaded, stored, or logged anywhere outside your device. Refreshing the page clears the log completely. This logger is a diagnostic tool for developers — your privacy and data are not transmitted.

Why don't some keys — like Fn or media keys — appear in the log?

Keys such as Fn and many dedicated media, volume, or brightness keys are handled by the keyboard's firmware or the operating system before the browser ever sees an event, so there is nothing for the logger to record. That is expected, not a fault. A standard key that still produces no keydown here — after you've clicked the capture box to focus it — points instead to a dead switch or a broken connection.