JavaScript Key Code Info
Press any key to see its event.key, event.code and legacy keyCode values.
Runs entirely in your browser.
See the Key Event Values for Any Key
About JavaScript Key Code Info
Press a key and every value a keydown event carries is shown at once. Which one you should use depends on the question: event.key is the character produced, so it changes with the keyboard layout and with Shift. event.code is the physical key position, so it stays the same whatever the layout - that is the one you want for game controls or a shortcut tied to a place on the keyboard.
keyCode and which are deprecated and kept only for old code. They are shown here because plenty of existing code still tests against them and it helps to see what the number actually was.
A few combinations never reach the page because the browser or the operating system claims them first - Ctrl+W and F5 among them. Nothing a page can do will capture those.
Other Developer Utilities
- Online Stopwatch — with lap times
- Docker Run to Compose — convert a run command
- ASCII Text Art — large letters for banners
- Device Information — screen, browser and capabilities
- SVG Placeholder Generator — vector placeholder images
- Placeholder Image — a raster PNG or JPG placeholder
- User Agent Parser — break down a UA string
- Responsive Tester — preview a page at many sizes
- Dockerfile Generator — build a Dockerfile
- Live Code Preview — edit HTML, CSS and JS together