Keyboard Event Tester
Find the JavaScript event.key, event.code, and keyCode for any key on your keyboard. Essential for keyboard event handling.
Press any key to see its event data
Features
- event.key value
- event.code value
- Legacy keyCode
- Modifier keys
- Key history
- One-click copy
How to Use
- 1Click anywhere on this page
- 2Press any key
- 3View all event properties
- 4Copy values you need
Frequently Asked Questions
What's the difference between key and code?
event.key represents the character ("a" or "A"), while event.code represents the physical key ("KeyA") regardless of layout.
Why is keyCode deprecated?
keyCode is deprecated because it varies between browsers and keyboard layouts. Use event.key or event.code instead.
Related Developer Tools Tools
API Rate Limit Calculator
Explore our free api rate limit calculator tool to enhance your workflow.
Ascii Converter
Explore our free ascii converter tool to enhance your workflow.
Base64
Explore our free base64 tool to enhance your workflow.
Binary Converter
Explore our free binary converter tool to enhance your workflow.
Core Web Vitals Checker
Explore our free core web vitals checker tool to enhance your workflow.
Cron Expression Generator
Explore our free cron expression generator tool to enhance your workflow.