Enum Key

Key code constants for KeyEvent.

enum Key : uint { ... }

Letters and numeric keys are sorted, so you can write something like Key.A <= key && key <= Key.Z.

The constants are very similar to such in WinAPI, to simplify translation.

Enum members

NameDescription
A A
add +
alpha0 0 on the alphanumeric part of keyboard
alpha1 1 on the alphanumeric part of keyboard
alpha2 2 on the alphanumeric part of keyboard
alpha3 3 on the alphanumeric part of keyboard
alpha4 4 on the alphanumeric part of keyboard
alpha5 5 on the alphanumeric part of keyboard
alpha6 6 on the alphanumeric part of keyboard
alpha7 7 on the alphanumeric part of keyboard
alpha8 8 on the alphanumeric part of keyboard
alpha9 9 on the alphanumeric part of keyboard
alt Alt
B B
backslash \
backspace Backspace
bracketClose ]
bracketOpen [
C C
caps Caps lock
comma ,
control Ctrl
D D
del Delete
divide /
down Down arrow
E E
end End
enter Return/enter key
equal =
escape Esc
F F
F1 F1
F10 F10
F11 F11
F12 F12
F13 F13
F14 F14
F15 F15
F16 F16
F17 F17
F18 F18
F19 F19
F2 F2
F20 F20
F21 F21
F22 F22
F23 F23
F24 F24
F3 F3
F4 F4
F5 F5
F6 F6
F7 F7
F8 F8
F9 F9
G G
H H
home Home
I I
ins Ins
J J
K K
L L
lalt Left alt
lcontrol Left ctrl
left Left arrow
lshift Left shift
lwin Left win key
M M
multiply *
N N
none
num0 Numpad 0
num1 Numpad 1
num2 Numpad 2
num3 Numpad 3
num4 Numpad 4
num5 Numpad 5
num6 Numpad 6
num7 Numpad 7
num8 Numpad 8
num9 Numpad 9
numAdd Numpad +
numDiv Numpad /
numlock Num lock
numMul Numpad *
numPeriod Numpad .
numSub Numpad -
O O
P P
pageDown Page down
pageUp Page up
pause Pause
period .
Q Q
quote '
R R
ralt Right alt
rcontrol Right ctrl
Right arrow
rshift Right shift
rwin Right win key
S S
scroll Scroll lock
semicolon ;
shift Shift
slash /
space Space
subtract -
T T
tab Tab
tilde ~
U U
up Up arrow
V V
W W
X X
Y Y
Z Z