JavaScript Keyboard Event Codes
Discover the exact values of keyboard events in JavaScript. Essential for building keyboard shortcuts, game controls, or accessible interfaces.
Event Properties Explained
- event.key: The actual character or key name (modern standard)
- event.code: Physical key location, same regardless of layout
- event.keyCode: Legacy numeric code (deprecated but widely used)
- event.which: Legacy alias for keyCode
- Modifiers: Ctrl, Shift, Alt, Meta (Command on Mac)