JS Key Tester
Test keyboard events and see event properties in real-time
Modifier Keys Status
Ctrl OFF
Alt OFF
Shift OFF
Meta (Cmd/Win) OFF
Press any key to see keyboard event information below
Events will appear in real-time showing keydown, keypress (deprecated), and keyup events
Keyboard Events
Press any key to start capturing events...
About Keyboard Events
Event Types
- keydown - Fires when a key is pressed down
- keypress - Fires when a character key is pressed (deprecated)
- keyup - Fires when a key is released
Event Properties
- key - The value of the key pressed (modern standard)
- code - Physical key code (keyboard position)
- keyCode - Numeric key code (deprecated)
- which - Alternative key code (deprecated)
- charCode - Character code for keypress (deprecated)
Note: keyCode, which, and charCode are deprecated properties. Use key and code for modern applications.