Skip to content
ToolSuite

Keyboard Key Code Viewer

See the key, code and legacy keyCode values for any key you press.

Processed in your browser

Your result will appear here as soon as you add some input.

How to use it

  1. 1Click into the field and press any key.
  2. 2The values for that key appear below.
  3. 3Use event.code for shortcuts and event.key for typed characters.

About the Keyboard Key Code Viewer

`event.key` is what the key produces - the character, after the keyboard layout and any modifiers. `event.code` is where the key physically sits, independent of layout.

That distinction decides whether a shortcut works for everyone. A shortcut bound to `code` KeyZ is in the same physical place on QWERTY, AZERTY and Dvorak; one bound to `key` "z" moves.

`keyCode` is deprecated and inconsistent between browsers, but still appears in older libraries, which is why it is shown.

Questions people ask

Is any of this information sent anywhere?

No. Every value is read from your browser by JavaScript running in this page and displayed locally. Nothing is transmitted, logged or stored.

Is it free, and do I need an account?

Yes, it is free, and there is no account, no sign-up and no watermark on the result. The project is funded by optional donations.