Toolvist

JS Keycode Tester

Press any key to see its JavaScript keyCode, code and key value instantly. Free online keycode tester for building keyboard shortcuts and handlers.

event.key
—
event.code
—
keyCode
—
which
—
Shift Ctrl Alt Meta

Free JS Keycode Tester

The Keycode Tester shows the key, code, and keyCode of any key you press. Click into the box and type — the event details appear instantly for use in your JavaScript.

How to Use

Focus the input area and press any key. You will see event.key, event.code, event.keyCode, and which modifier keys are held down.

  • Shows key, code, and keyCode
  • Detects Shift, Ctrl, Alt, and Meta
  • Handy for wiring up keyboard event handlers

Related Developer Tools

Browse all Developer Tools →