Was this helpful?
Virtual Key Values
The events KeyDown Event and ChildKeyDown Event return values that correspond to the following table of values. Each virtual key that can be returned is listed here with its corresponding hexadecimal and decimal value:
Virtual Key
Hex
Dec
VK_BACK
0x08
8
VK_SHIFT
0x10
16
VK_CAPITAL
0x14
20
VK_PRIOR
0x21
33
VK_HOME
0x24
36
VK_RIGHT
0x27
39
VK_PRINT
0x2A
42
VK_HELP
0x2F
47
VK_2
0x32
50
VK_5
0x35
53
VK_8
0x38
56
VK_B
0x42
66
VK_E
0x45
69
VK_H
0x48
72
VK_K
0x4B
75
VK_N
0x4E
78
VK_Q
0x51
81
VK_T
0x54
84
VK_W
0x57
87
VK_Z
0x5A
90
VK_NUMPAD2
0x62
98
VK_NUMPAD5
0x65
101
VK_NUMPAD8
0x68
104
VK_ADD
0x6B
107
VK_DECIMAL
0x6E
110
VK_F2
0x71
113
VK_F5
0x74
116
VK_F8
0x77
119
VK_F11
0x7A
122
VK_F14
0x7D
125
VK_F17
0x80
128
VK_F20
0x83
131
VK_F23
0x86
134
VK_SCROLL
0x91
145
VK_LCONTROL
0xA2
162
VK_RMENU
0xA5
165
VK_TAB
0x09
9
VK_CONTROL
0x11
17
VK_ESCAPE
0x1B
27
VK_NEXT
0x22
34
VK_LEFT
0x25
37
VK_DOWN
0x28
40
VK_INSERT
0x2D
45
VK_0
0x30
48
VK_3
0x33
51
VK_6
0x36
54
VK_9
0x39
57
VK_C
0x43
67
VK_F
0x46
70
VK_I
0x49
73
VK_L
0x4C
76
VK_O
0x4F
79
VK_R
0x52
82
VK_U
0x55
85
VK_X
0x58
88
VK_NUMPAD0
0x60
96
VK_NUMPAD3
0x63
99
VK_NUMPAD6
0x66
102
VK_NUMPAD9
0x69
105
VK_SEPARATOR
0x6C
108
VK_DIVIDE
0x6F
111
VK_F3
0x72
114
VK_F6
0x75
117
VK_F9
0x78
120
VK_F12
0x7B
123
VK_F15
0x7E
126
VK_F18
0x81
129
VK_F21
0x84
132
VK_F24
0x87
135
VK_LSHIFT
0XA0
160
VK_RCONTROL
0XA3
163
VK_RETURN
0x0D
13
VK_PAUSE
0x13
19
VK_SPACE
0x20
32
VK_END
0x23
35
VK_UP
0x26
38
VK_SELECT
0x29
41
VK_DELETE
0x2E
46
VK_1
0x31
49
VK_4
0x34
52
VK_7
0x37
55
VK_A
0x41
65
VK_D
0x44
68
VK_G
0x47
71
VK_J
0x4A
74
VK_M
0x4D
77
VK_P
0x50
80
VK_S
0x53
83
VK_V
0x56
86
VK_Y
0x59
89
VK_NUMPAD1
0x61
97
VK_NUMPAD4
0x64
100
VK_NUMPAD7
0x67
103
VK_MULTIPLY
0x6A
106
VK_SUBTRACT
0x6D
109
VK_F1
0x70
112
VK_F4
0x73
115
VK_F7
0x76
118
VK_F10
0x79
121
VK_F13
0x7C
124
VK_F16
0x7F
127
VK_F19
0x82
130
VK_F22
0x85
133
VK_NUMLOCK
0x90
144
VK_RSHIFT
0XA1
161
VK_LMENU
0XA4
164
 
Last modified date: 12/20/2023