Loading favorites storage...

Keyboard Event Info

Focus the area below and press a key to see its JavaScript event properties. Tab moves focus to the next control. A physical keyboard may be needed on mobile.

Focus here to start capturing keys

About Keyboard Events

This tool captures keydown events in JavaScript and displays various properties associated with the pressed key. It can be helpful for developers to understand how different keys are reported by browsers.

  • event.key: The value of the key pressed (e.g., a, Enter, F5).
  • event.code: The physical key code (e.g., KeyA, Enter, F5). This is layout-independent.
  • event.keyCode / event.which: Deprecated numerical codes for keys.
  • event.location: Indicates the location of the key on the keyboard (e.g., standard, left/right modifier, numpad).
  • Modifier Keys: Shows if Alt, Ctrl, Meta (Command/Windows key), or Shift were pressed.

Focus the area above to enable key capture. Moving focus away pauses capture so the rest of the page remains usable.