freeworktool logofreeworktool

Keyboard Event Inspector

Press any key or shortcut to inspect event.key, event.code, modifiers, location, and legacy keyCode live.

Loading Keyboard Event Inspector in your browser — 100% client-side with zero uploads.

Related developer tools

All Developer tools

HTML / CSS / JS Formatter

Beautify and indent HTML, CSS, and JavaScript files with customizable indentation rules.

Developer

HTML, CSS & JS Minifier

Minify HTML markup, CSS stylesheets, and JavaScript code by stripping comments and unnecessary whitespace.

Developer

Base64 Encoder & Decoder

Encode or decode UTF-8 text and convert local files into Base64 data URLs.

Developer

URL Encoder & Decoder

Percent-encode or decode URLs and inspect or edit query string parameters.

Developer

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7 identifiers.

Developer

Regex Tester

Test regular expressions with live match highlights, capture groups, and replacements.

Developer

About Keyboard Event Inspector

Press any key or keyboard shortcut to inspect live KeyboardEvent properties—including event.key, physical event.code, modifier flags, key location, repeat state, and legacy keyCode—along with a recent key history table.

How to use Keyboard Event Inspector

  1. 1

    Click anywhere outside text inputs and press any key or modifier combination (such as Cmd+K or Shift+ArrowRight).

  2. 2

    Optionally enable "Capture browser shortcuts" to call preventDefault() on navigation keys like Space, Tab, and Arrows.

  3. 3

    Copy the generated JavaScript conditional snippet or review the recent keydown history log.

Frequently asked questions

Should I use event.key or event.code in modern JavaScript?

Use event.key when you care about the typed character (respecting keyboard layout), and use event.code when you care about the physical key position (such as WASD game controls).

Why is event.keyCode labeled legacy?

Web standards deprecated numeric keyCode values in favor of readable event.key and event.code strings, though keyCode is still shown here for debugging older codebases.

Are my keystrokes recorded or transmitted anywhere?

No. Events are held temporarily in memory only while the tab is open and never leave your browser.