2 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS"
14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE.
32 // Control-break processing
33 // Middle mouse button (three-button mouse)
47 #define VK_RETURN 0x0D
53 #define VK_CONTROL 0x11 // CTRL key
56 #define VK_MENU 0x12 // ALT key
59 #define VK_PAUSE 0x13 // PAUSE key
62 #define VK_CAPITAL 0x14 // CAPS LOCK key
65 #define VK_KANA 0x15 // Input Method Editor (IME) Kana mode
68 #define VK_HANGUL 0x15 // IME Hangul mode
71 #define VK_JUNJA 0x17 // IME Junja mode
74 #define VK_FINAL 0x18 // IME final mode
77 #define VK_HANJA 0x19 // IME Hanja mode
80 #define VK_KANJI 0x19 // IME Kanji mode
83 #define VK_ESCAPE 0x1B // ESC key
86 #define VK_CONVERT 0x1C // IME convert
89 #define VK_NONCONVERT 0x1D // IME nonconvert
92 #define VK_ACCEPT 0x1E // IME accept
95 #define VK_MODECHANGE 0x1F // IME mode change request
98 #define VK_SPACE 0x20 // SPACE key
101 #define VK_PRIOR 0x21 // PAGE UP key
104 #define VK_NEXT 0x22 // PAGE DOWN key
107 #define VK_END 0x23 // END key
110 #define VK_HOME 0x24 // HOME key
113 #define VK_LEFT 0x25 // LEFT ARROW key
116 #define VK_UP 0x26 // UP ARROW key
119 #define VK_RIGHT 0x27 // RIGHT ARROW key
122 #define VK_DOWN 0x28 // DOWN ARROW key
125 #define VK_SELECT 0x29 // SELECT key
128 #define VK_PRINT 0x2A // PRINT key
131 #define VK_EXECUTE 0x2B // EXECUTE key
134 #define VK_SNAPSHOT 0x2C // PRINT SCREEN key
137 #define VK_INSERT 0x2D // INS key
140 #define VK_DELETE 0x2E // DEL key
143 #define VK_HELP 0x2F // HELP key
183 #define VK_LWIN 0x5B // Left Windows key (Microsoft Natural keyboard)
185 #define VK_RWIN 0x5C // Right Windows key (Natural keyboard)
187 #define VK_APPS 0x5D // Applications key (Natural keyboard)
189 #define VK_SLEEP 0x5F // Computer Sleep key
192 #define VK_NUMPAD0 0x60
193 #define VK_NUMPAD1 0x61
194 #define VK_NUMPAD2 0x62
195 #define VK_NUMPAD3 0x63
196 #define VK_NUMPAD4 0x64
197 #define VK_NUMPAD5 0x65
198 #define VK_NUMPAD6 0x66
199 #define VK_NUMPAD7 0x67
200 #define VK_NUMPAD8 0x68
201 #define VK_NUMPAD9 0x69
202 #define VK_MULTIPLY 0x6A
204 #define VK_SEPARATOR 0x6C
205 #define VK_SUBTRACT 0x6D
206 #define VK_DECIMAL 0x6E
207 #define VK_DIVIDE 0x6F
234 #define VK_NUMLOCK 0x90
235 #define VK_SCROLL 0x91
236 #define VK_LSHIFT 0xA0
237 #define VK_RSHIFT 0xA1
238 #define VK_LCONTROL 0xA2
239 #define VK_RCONTROL 0xA3
240 #define VK_LMENU 0xA4
241 #define VK_RMENU 0xA5
243 #define VK_BROWSER_BACK 0xA6 // Windows 2000/XP: Browser Back key
244 #define VK_BROWSER_FORWARD 0xA7 // Windows 2000/XP: Browser Forward key
245 #define VK_BROWSER_REFRESH 0xA8 // Windows 2000/XP: Browser Refresh key
246 #define VK_BROWSER_STOP 0xA9 // Windows 2000/XP: Browser Stop key
247 #define VK_BROWSER_SEARCH 0xAA // Windows 2000/XP: Browser Search key
248 #define VK_BROWSER_FAVORITES 0xAB // Windows 2000/XP: Browser Favorites key
249 #define VK_BROWSER_HOME 0xAC // Windows 2000/XP: Browser Start and Home key
250 #define VK_VOLUME_MUTE 0xAD // Windows 2000/XP: Volume Mute key
251 #define VK_VOLUME_DOWN 0xAE // Windows 2000/XP: Volume Down key
252 #define VK_VOLUME_UP 0xAF // Windows 2000/XP: Volume Up key
253 #define VK_MEDIA_NEXT_TRACK 0xB0 // Windows 2000/XP: Next Track key
254 #define VK_MEDIA_PREV_TRACK 0xB1 // Windows 2000/XP: Previous Track key
255 #define VK_MEDIA_STOP 0xB2 // Windows 2000/XP: Stop Media key
256 #define VK_MEDIA_PLAY_PAUSE 0xB3 // Windows 2000/XP: Play/Pause Media key
257 #define VK_MEDIA_LAUNCH_MAIL 0xB4 // Windows 2000/XP: Start Mail key
258 #define VK_MEDIA_LAUNCH_MEDIA_SELECT 0xB5 // Windows 2000/XP: Select Media key
259 #define VK_MEDIA_LAUNCH_APP1 0xB6 // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
260 #define VK_MEDIA_LAUNCH_APP2 0xB7 // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key
262 // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key
263 #define VK_OEM_1 0xBA
265 // Windows 2000/XP: For any country/region, the '+' key
266 #define VK_OEM_PLUS 0xBB
268 // Windows 2000/XP: For any country/region, the ',' key
269 #define VK_OEM_COMMA 0xBC
271 // Windows 2000/XP: For any country/region, the '-' key
272 #define VK_OEM_MINUS 0xBD
274 // Windows 2000/XP: For any country/region, the '.' key
275 #define VK_OEM_PERIOD 0xBE
277 // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key
278 #define VK_OEM_2 0xBF
280 // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key
281 #define VK_OEM_3 0xC0
283 // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key
284 #define VK_OEM_4 0xDB
286 // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key
287 #define VK_OEM_5 0xDC
289 // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key
290 #define VK_OEM_6 0xDD
292 // VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
293 #define VK_OEM_7 0xDE
295 // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
296 #define VK_OEM_8 0xDF
298 // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
299 #define VK_OEM_102 0xE2
301 // Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
302 #define VK_PROCESSKEY 0xE5
304 // Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
305 #define VK_PACKET 0xE7
307 #define VK_ATTN 0xF6 // Attn key
308 #define VK_CRSEL 0xF7 // CrSel key
309 #define VK_EXSEL 0xF8 // ExSel key
310 #define VK_EREOF 0xF9 // Erase EOF key
311 #define VK_PLAY 0xFA // Play key
312 #define VK_ZOOM 0xFB // Zoom key
314 #define VK_NONAME 0xFC // Reserved for future use
316 #define VK_PA1 0xFD // VK_PA1 (FD) PA1 key
318 #define VK_OEM_CLEAR 0xFE // Clear key