KeyCode Challenge

Press Any Key To Start

event.code


    

The physical key on the keyboard. Doesn't care if you are holding a modifier like Shift.

event.key


    

The value of the key pressed. Accounts for modifiers keys that return CAPS and alternate chars.

event.which


    

The physical key on the keyboard. Doesn't care if you are holding a modifier like Shift.

event.location


    

Some keys exist more than once on your keyboard. This provides the location of the key pressed. Try it with both shifts. More here.

1 A V
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
Q
W
E
R
T
Y
U
I
O
P
{
[
}
]
|
\
Caps
Lock
A
S
D
F
G
H
J
K
L
:
;
"
'
Enter
Shift
Z
X
C
V
B
N
M
<
,
>
.
?
/
Shift
Ctrl
Alt
Alt
Prnt
Ctrl
Prnt Scrn
Scroll Lock
Pause Break
Insert
Home
Page Up
Del
End
Page Down
^
<
v
>