The Keys enumeration contains codes of keyboard keys.
It is used by the following properties and methods:
IWinApplicationClass.GetAsyncKeyState.
IWinApplicationClass.GetKeyState.
Value | Brief description |
0 | None. There are no pressed keys. |
1 | LButton. Left mouse button. |
2 | RButton. Right mouse button. |
3 | Cancel. Cancel key. |
4 | MButton. Middle mouse button (three-button mouse). |
5 | XButton1. First mouse button (five-button mouse). |
6 | XButton2. Second mouse button (five-button mouse). |
8 | Back. BACKSPACE key. |
9 | Tab. TAB key. |
10 | LineFeed. LINEFEED key. |
12 | Clear. Clear key. |
13 | Enter. ENTER key. |
13 | Return_. Return key. |
16 | Shift. SHIFT key. |
16 | ShiftKey |
17 | Control |
17 | ControlKey. CTRL key. |
18 | Alt. ALT modifier key. |
18 | Menu. ALT key. |
19 | Pause. Pause key. |
20 | Capital. CAPS LOCK key. |
20 | CapsLock. CAPS LOCK key. |
21 | HanguelMode. IME Hanguel mode key (it is supported for compatibility; use HangulMode key). |
21 | HangulMode. IME Hangul mode key. |
21 | KanaMode. IME Kana mode key. |
23 | JunjaMode. IME Junja mode key. |
24 | FinalMode. IME final mode key. |
25 | HanjaMode. IME Hanja mode key. |
25 | KanjiMode. IME Kanji mode key. |
27 | Escape. ESC key. |
28 | IMEConvert. IME conversion key. |
29 | IMENonconvert. IME key without conversion. |
30 | IMEAceept. IME accept key. |
31 | IMEModeChange. IME mode change key. |
32 | Space. Space key. |
33 | PageUp. PAGE UP key. |
33 | Prior. PAGE UP key. |
34 | Next. PAGE DOWN key. |
34 | PageDown. PAGE DOWN key. |
35 | End_. END key. |
36 | Home. Home page key. |
37 | Left. LEFT key. |
38 | Up. UP key. |
39 | Right. RIGHT key. |
40 | Down. DOWN key. |
41 | Select_. Select key. |
42 | Print. Print key. |
43 | Execute. Execute key. |
44 | PrintScreen. PRINT SCREEN key. |
44 | Snapshot |
45 | Insert. INS key. |
46 | Delete. DEL key. |
47 | Help. Help key. |
48 | D0. 0 key. |
49 | D1. 1 key. |
50 | D2. 2 key. |
51 | D3. 3 key. |
52 | D4. 4 key. |
53 | D5. 5 key. |
54 | D6. 6 key. |
55 | D7. 7 key. |
56 | D8. 8 key. |
57 | D9. 9 key. |
65 | A |
66 | B |
67 | C |
68 | D |
69 | E |
70 | F |
71 | G |
72 | H |
73 | I |
74 | J |
75 | K |
76 | L |
77 | M |
78 | N |
79 | O |
80 | P |
81 | Q |
82 | R |
83 | S |
84 | T |
85 | U |
86 | V |
87 | W |
88 | X |
89 | Y |
90 | Z |
91 | LWin. Left key with the Windows emblem (Microsoft Natural keyboard). |
92 | RWin. Right key with the Windows emblem (Microsoft Natural keyboard). |
93 | Apps. Application key (Microsoft Natural keyboard). |
96 | NumPad0. 0 key on the numeric keypad. |
97 | NumPad1. 1 key on the numeric keypad. |
98 | NumPad2. 2 key on the numeric keypad. |
99 | NumPad3. 3 key on the numeric keypad. |
100 | NumPad4. 4 key on the numeric keypad. |
101 | NumPad5. 5 key on the numeric keypad. |
102 | NumPad6. 6 key on the numeric keypad. |
103 | NumPad7. 7 key on the numeric keypad. |
104 | NumPad8. 8 key on the numeric keypad. |
105 | NumPad9. 9 key on the numeric keypad. |
106 | Multiply. Multiply key. |
107 | Add. Add key. |
108 | Separator. Separator key. |
109 | Subtract. Subtract key. |
110 | Decimal. Decimal key. |
111 | Divide. Divide key. |
112 | F1. F1 key. |
113 | F2. F2 key. |
114 | F3. F3 key. |
115 | F4. F4 key. |
116 | F5. F5 key. |
117 | F6. F6 key. |
118 | F7. F7 key. |
119 | F8. F8 key. |
120 | F9. F9 key. |
121 | F10. F10 key. |
122 | F11. F11 key. |
123 | F12. F12 key. |
124 | F13. F13 key. |
125 | F14. F14 key. |
126 | F15. F15 key. |
127 | F16. F16 key. |
128 | F17. F17 key. |
129 | F18. F18 key. |
130 | F19. F19 key. |
131 | F20. F20 key. |
132 | F21. F21 key. |
133 | F22. F22 key. |
134 | F23. F23 key. |
135 | F24. F24 key. |
144 | NumLock. NUM LOCK key. |
145 | Scroll. SCROLL LOCK key. |
160 | LShiftKey. Left SHIFT key. |
161 | RShiftKey. Right SHIFT key. |
162 | LControlKey. Left CTRL key. |
163 | RControlKey. Right CTRL key. |
164 | LMenu. ALT left key. |
165 | RMenu. ALT right key. |
166 | BrowserBack. Browser back key (Windows 2000 or later release). |
167 | BrowserForward. Browser forward key (Windows 2000 or later release). |
168 | BrowserRefresh. Browser refresh key (Windows 2000 or later release). |
169 | BrowserStop. Browser stop key (Windows 2000 or later release). |
170 | BrowserSearch. Browser search key (Windows 2000 or later release). |
171 | BrowserFavorites. Browser favorites key (Windows 2000 or later release). |
172 | BrowserHome. Browser home key (Windows 2000 or later release). |
173 | VolumeMute. Volume mute key (Windows 2000 or later release). |
174 | VolumeDown. Volume down key (Windows 2000 or later release). |
175 | VolumeUp. Volume up key (Windows 2000 or later release). |
176 | MediaNextTrack. Media next track key (Windows 2000 or later release). |
177 | MediaPreviousTrack. Media previous track key (Windows 2000 or later release). |
178 | MediaStop. Media stop key (Windows 2000 or later release). |
179 | MediaPlayPause. Media play pause key (Windows 2000 or later release). |
180 | LaunchMail. Launch mail key (Windows 2000 or later release). |
181 | SelectMedia. Select media key (Windows 2000 or later release). |
182 | LaunchApplication1. Launch application1 key (Windows 2000 or later release). |
183 | LaunchApplication2. Launch application2 key (Windows 2000 or later release). |
186 | OemSemicolon. OEM semicolon key on the standard USA keyboard (Windows 2000 or later release). |
187 | Oemplus. OEM plus key on the keyboard of any country (Windows 2000 or later release). |
188 | Oemcomma. OEM comma key on the keyboard of any country (Windows 2000 or later release). |
189 | OemMinus. OEM minus key on the keyboard of any country (Windows 2000 or later release). |
190 | OemPeriod. OEM point key on the keyboard of any country or region (Windows 2000 or later release). |
191 | OemQuestion. OEM question key on the standard USA keyboard (Windows 2000 or later release). |
192 | Oemtilde. OEM tilde key on the standard USA keyboard (Windows 2000 or later release). |
219 | OemOpenBrackets. OEM open brackets key on the standard USA keyboard (Windows 2000 or later release). |
220 | OemPipe. OEM pipe key on the standard USA keyboard (Windows 2000 or later release). |
221 | OemCloseBrackets. OEM close brackets key on the standard USA keyboard (Windows 2000 or later release). |
222 | OemQuotes. OEM quotes key on the standard USA keyboard (Windows 2000 or later release). |
223 | Oem8. For OEM. |
226 | OemBackslash. OEM angle bracket key or backslash on the RT keyboard that has 102 keys (Windows 2000 or later release). |
229 | ProcessKey. Process key. |
246 | Attn. ATTN key. |
247 | Crsel. CRSEL key. |
248 | Exsel. EXSEL key. |
249 | EraseEof. ERASE EOF key. |
250 | Play. Play key. |
251 | Zoom. Zoom key. |
252 | NoName. Constant reserved for future. |
253 | Pa1. PA1 key. |
254 | OemClear. Clear key. |
65535 | KeyCode. Bit-by-bit mask for extracting the key code from the key value. |
-65536 | Modifiers. Bit-by-bit mask for extracting the modifiers from the key value. |
See also: