The table below contains a list of all available virtual key codes. While most keys are fairly standardized, a certain few may be different for your specific keyboard layout. Please refer to documentation on your keyboard locale for further details.
Some virtual keys have both a vague and specific copy. For example,
VK name | Value (in decimal) | Note |
---|---|---|
1 | Left mouse button | |
2 | Right mouse button | |
3 | The "Control-break" key-code; generally input by CTRL+C | |
4 | Middle mouse button | |
5 | "Extra" mouse button 1 | |
6 | "Extra" mouse button 2 | |
8 | ||
9 | ||
13 | An alias to key.VK_ENTER | |
13 | ||
16 | Use key.VK_LSHIFT or key.VK_RSHIFT to further specify | |
17 | Use key.VK_LCONTROL or key.VK_RCONTROL to further specify | |
18 | Use key.VK_LALT or key.VK_RALT to further specify | |
18 | An alias to key.VK_ALT | |
19 | ||
20 | An alias to key.VK_CAPSLOCK | |
20 | ||
27 | ||
32 | ||
33 | An alias to key.VK_PAGEUP | |
33 | ||
34 | An alias to key.VK_PAGEDOWN | |
34 | ||
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
40 | ||
42 | Deprecated (probably doesn't exist on your keyboard anymore) | |
44 | ||
44 | An alias to key.VK_PRINTSCREEN | |
45 | ||
46 | ||
47 | ||
48 | From the number row; not the number pad | |
49 | From the number row; not the number pad | |
50 | From the number row; not the number pad | |
51 | From the number row; not the number pad | |
52 | From the number row; not the number pad | |
53 | From the number row; not the number pad | |
54 | From the number row; not the number pad | |
55 | From the number row; not the number pad | |
56 | From the number row; not the number pad | |
57 | From the number row; not the number pad | |
65 | ||
66 | ||
67 | ||
68 | ||
69 | ||
70 | ||
71 | ||
72 | ||
73 | ||
74 | ||
75 | ||
76 | ||
77 | ||
78 | ||
79 | ||
80 | ||
81 | ||
82 | ||
83 | ||
84 | ||
85 | ||
86 | ||
87 | ||
88 | ||
89 | ||
90 | ||
91 | The left "Windows" key | |
91 | An alias to key.VK_LWINDOWS | |
92 | The right "Windows" key | |
92 | An alias to key.VK_RWINDOWS | |
93 | The "Apps" button, generally next to your right Control key | |
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 | The * key in the number pad | |
107 | The + key in the number pad | |
109 | The - key in the number pad | |
110 | The . key in the number pad | |
111 | The / key in the number pad | |
112 | ||
113 | ||
114 | ||
115 | ||
116 | ||
117 | ||
118 | ||
119 | ||
120 | ||
121 | ||
122 | ||
123 | ||
144 | ||
145 | ||
160 | Left shift | |
161 | Right shift | |
162 | Left control | |
163 | Right control | |
164 | An alias to key.VK_LALT | |
164 | Left alt | |
165 | Right alt | |
165 | An alias to key.VK_RALT | |
187 | The + key in the number row | |
188 | ||
190 | ||
512 | A virtual key code sent as an event when the mouse is moved | |
513 | A virtual key code sent as an event when the mouse wheel is moved |
Page last updated at 2018-09-25 20:47:49
Copyright 2024