Waiting for a key…

Learn

Keycode Info Guide

About this tool

Press a key and see everything the browser reports about it: the key name, the legacy keyCode and whichCode, the physical position on the keyboard, and which modifier keys were held. It is for wiring up a shortcut without guessing.

Questions

Why is keyCode deprecated?
It is inconsistent across layouts and languages — the same physical key reports different values. Use event.key for the character and event.code for the physical position, and press a key here to see the difference.