How to Use the JavaScript Keycode Finder
The JavaScript Keycode Finder is an interactive tool that displays detailed keyboard event information when you press any key. It shows the key, code, keyCode, which, and location properties — everything you need when building keyboard shortcuts, game controls, or accessible web applications.
Step-by-Step
Features
event.key, event.code, event.keyCode, event.which, event.location, and event.type for every keypress.shiftKey, ctrlKey, altKey, and metaKey modifiers during each event.keydown, keyup, and keypress events to see how values differ across event types.keyCode and which with notes about modern alternatives.Common Use Cases
event.key and event.code values to use in your shortcut handler code.event.code for WASD controls that work regardless of keyboard layout.keyCode values across browsers to handle inconsistencies in legacy keyboard event handling.Why Use This Tool
Keyboard event handling is one of the most common tasks in frontend development, yet the API is surprisingly inconsistent across browsers and keyboard layouts. The keyCode and which properties are deprecated but still widely used. This tool gives you a live reference for the modern key and code properties alongside the legacy values, so you can write keyboard handlers that work everywhere. No need to add temporary console.log statements — just press keys and copy values.