Skip to main content
Back to Tools
Web Tools

JavaScript Event Keycodes

Interactive keyboard event inspector. Press any key to see event.key, event.code, event.keyCode, modifiers, and location. Includes a searchable reference table of all standard keycodes. Generates ready-to-use JavaScript event listener code. Runs entirely in your browser — your data never leaves your machine.

javascript keyboard events keycodes developer-tools reference

Published May 28, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Click the capture area and press any key. The tool displays all keyboard event properties in real-time: event.key, event.code, event.keyCode (deprecated but still widely used), event.which, event.location, and all modifier flags. It also generates a JavaScript code snippet for handling that specific key combination.

Features

  • Live capture: press any key to see all event properties instantly
  • Code generation: ready-to-use addEventListener code for the pressed key
  • Key history: tracks last 10 key presses with modifier state
  • Reference table: searchable database of all standard keycodes
  • Category filter: letters, numbers, function keys, modifiers, navigation, symbols
  • Modifier detection: Ctrl, Alt, Shift, Meta shown with key combinations
  • Location awareness: distinguishes left/right/numpad key locations
  • Private: runs entirely in the browser — no data transmitted

Use Cases

  • Looking up event.key vs event.code for keyboard shortcuts
  • Checking keyCode values for legacy browser support
  • Building accessible keyboard navigation handlers
  • Debugging keyboard event handling in web applications
  • Quick reference for JavaScript keyboard event API