Keycode / Keyboard Event Tester

Press any key and instantly see event.key, event.code, keyCode, location, and modifier states.

?

Click or hover here, then press any key

About this tool

When debugging keyboard shortcuts, handling custom hotkeys, or building accessible web apps, you need to know exactly what values the browser sends. This tool captures every KeyboardEvent property as you type, without sending anything to a server. It also tracks keydown/keyup/keypress events and prevents accidental tab/window switching for critical keys.

How to use the Keycode / Keyboard Event Tester

  1. Click or hover the capture zone to focus
  2. Press any key on your keyboard
  3. Read the event properties: key, code, keyCode, location
  4. Check modifier flags: Ctrl, Shift, Alt, Meta
  5. Toggle "prevent default" for Tab or F-keys to avoid leaving the page
  6. Browse the history table for the last 50 events

Features

  • Captures event.key, event.code, and event.keyCode
  • Shows key location: Standard, Left, Right, Numpad
  • Modifier state display (Ctrl/Shift/Alt/Meta)
  • Repeat detection for held keys
  • 50-event history table
  • Prevent default toggle for Tab and Function keys
  • One-click copy of event details

Frequently asked questions

Is this keycode tester free?

Yes. Test keyboard events and inspect key properties online for free with no registration.

What keyboard properties are shown?

The tool displays event.key, event.code, keyCode, location, and modifier states (Ctrl, Shift, Alt, Meta).

Can I prevent default behavior for special keys?

Yes. Toggle the Prevent Default option to capture Tab and Function keys without leaving the page.

Is anything sent to a server when I press keys?

No. Everything is captured and displayed locally in your browser. No data is transmitted.