Press a key and see the code below.
In case your browser doesn't work with the key code, the following possibilities are supported as well:
Each type has its advantages and disadvantages:
- code: This is the default. Might not work in IE, Edge and older verisons of browsers
- key: Should work in all modern browsers, but is sensitive for modifiers. For example, if someone presses capslock, all letter keys might not respond anymore because they were meant to register lowercase letters only.
- which: Old version of key checking. Currently deprecated, but should be available in almost any browser.
- keyCode: deprecated; synonymous for which; doesn't work firefox
- char: deprecated; doesn't work in firefox or chromium
- charCode: deprecated; synonymous of which
- keyIdentifier: deprecated; doesn't work in firefox or chromium