Interactive JavaScript Key and Char Codes


This page allows you to press keys and instantly discover the corresponding keyCodes and charCodes.

Currently only 101-key US keyboards are assumed. If you'd like to see other keyboard styles, let me know via the comments below or by contacting me.

Sometimes pressing many keys at once or changing focus while a key is pressed can mess up the displayed key state. If you see a "stuck" key, just focus this window and press the key again, and things should be fixed.

Press any key to continue . . .


Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+ Backspace
Tab qQ wW eE rR tT yY uU iI oO pP [{ ]} \|
Caps aA sS dD fF gG hH jJ kK lL ;: '" Enter ⏎
Shift zZ xX cC vV bB nN mM ,< .> /? Shift
Ctrl Win Alt   Alt Win Menu Ctrl
PrSc Scroll Pause
Ins Home PgUp
Del End PgDn
Num / * -
7 8 9 +
4 5 6  
1 2 3
0 .  


Key code
Last char code

Comments