Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Keyboard Event Inspector

Press any key and see the full JavaScript keyboard event: key, code, the legacy keyCode and which, modifier states, location and repeat flag, with a history of recent presses you can copy.

Everything runs locally in your browser. Your data never leaves your device.

Click here, then press any key
You can also reach this area with Tab. Keys are only captured while it has focus, so the rest of the page keeps working normally.

Not capturing. Click the area or focus it with Tab to start. Some combinations are reserved by the OS or browser, like Cmd+W or Cmd+Q, and never reach a web page.

About the Keyboard Event Inspector

This tool shows you exactly what JavaScript sees when you press a key. Click the capture area and type. Every keydown and keyup appears with its key and code values, the legacy keyCode and which numbers, the held modifiers, the CapsLock and NumLock states, the key location and the auto-repeat flag.

A history collects your presses so you can study a whole shortcut or key sequence, then copy it as JSON or as a plain text table for a bug report or a test case. For the clipboard side of browser events, the Clipboard Inspector shows every format a copy carries.

What you can do

  • Find the event.key and event.code values for any key on your keyboard.
  • Look up the legacy keyCode and which numbers when working on older code.
  • Check which modifier flags a shortcut sets, including Ctrl, Alt, Shift and Meta.
  • Tell left and right Shift, Ctrl and Alt apart by their reported location.
  • See if CapsLock or NumLock was on during a press, read via getModifierState.
  • Watch the auto-repeat flag flip when you hold a key down.
  • Copy a recorded key sequence as JSON or a readable table.

How to use the Keyboard Event Inspector

  1. 1Click the capture area, or focus it with Tab.
  2. 2Press the key or shortcut you want to inspect. While the area has focus, keys like Tab and Space are captured instead of acting on the page.
  3. 3Read the live display, the event details and the history below it.
  4. 4Copy single events or the whole history as JSON or a plain text table.
  5. 5Click anywhere outside the area to give your keyboard back to the page.

The difference between key and code

event.key tells you what a press means with the active keyboard layout, like a, ß or Enter. event.code names the physical key, like KeyA or Numpad1, and stays the same on every layout. On a German layout, the key labeled Z reports key: "z" but code: "KeyY", because it sits where a US keyboard has Y. Handle shortcuts and typed characters with key, and use code for position based input like WASD movement, so the keys stay under the same fingers on every layout.

About keyCode and which

keyCode and which are deprecated. Their numbers differ between browsers and layouts for some keys, and new code should read key or code instead. The inspector still shows both because plenty of older code depends on them, and you often need the exact number a browser reports to maintain it.

Why some keys never show up

The operating system and the browser reserve some combinations for themselves and handle them before a page sees any event. Cmd+W closes the tab and Cmd+Q quits the browser on macOS, and Ctrl+N opens a new window in most browsers. Media keys, power keys and some laptop function keys can also be consumed by the system. If a press shows nothing here, it never reached the page, and no script can observe it.

Enter a resolution to get its simplified aspect ratio, or start from a ratio and one side to get the missing dimension. Knows the common ratios like 16:9, 4:3 and 21:9 and shows how close your size is to each.

Create barcodes in dozens of formats, from EAN-13, UPC-A and Code 128 to QR Code, Data Matrix and PDF417. Type the content, tune the size, colors and text options, and download the result as PNG or SVG.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Verify a checksum online: drop a file, paste the expected checksum and see instantly whether they match. The hash type is detected from the checksum itself, covering MD5, SHA-1, SHA-256, SHA-512, BLAKE3, CRC-32 and more, and sha256sum lines or whole checksum files can be pasted as-is.

Convert Unix file permissions between checkboxes, octal like 755 and symbolic notation like rwxr-xr-x, all kept in sync as you edit any of them. Covers setuid, setgid and the sticky bit, and shows the matching chmod command ready to copy.

See what your clipboard really holds. One press lists every format on it, from plain text and HTML to Excel tables and images, each with its type, size and a preview. Pasting works too, and can reveal even more formats.