a11y.skipToMainContent
1

Keycode Info

Press any key to see all its JavaScript keyboard event properties: key, code, keyCode, which, charCode, and more.

Click here and press any key…
Was this tool helpful?
Send output to:
Advertisement

How to use Keycode Info

  1. Click the input area (or just start pressing keys).
  2. Press any key to see its event properties.
  3. Use the displayed values in your JavaScript code.

Keycode Info అంటే ఏమిటి?

JavaScript keyboard events carry multiple properties (key, code, keyCode, which, charCode, location) that can be confusing. This tool shows all properties for any key you press, making it easy to find the right value for your event handlers.

Press any key — including modifier keys, function keys, and special characters — to see a complete breakdown of the event properties. Useful for building keyboard shortcuts, game controls, and accessibility features.

Advertisement

FAQ

What is the difference between key and code?
event.key is the character produced (e.g., 'a' or 'A'), while event.code is the physical key pressed (e.g., 'KeyA'). Use key for character input, code for physical layout-independent shortcuts.
Is keyCode deprecated?
Yes. keyCode is deprecated in the spec but still widely supported. Use key or code for new code.
Does this work with modifier keys?
Yes. Shift, Ctrl, Alt, Meta, CapsLock, and all other keys are supported. The tool also shows modifier state.

Related tools

Author

MW
Marcus Webb"The DevTool Craftsman"

Full-Stack Developer & Tools Architect

Marcus has been writing code since the dial-up era. He has contributed to open-source developer tools, built CI/CD pipelines for startups, and debugged production incidents at 3 AM more times than he would like to admit. His philosophy is that the best developer tool is the one that gets out of your way, and he writes about practical tooling that helps teams ship faster with fewer headaches.

Advertisement