1/* 2 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 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. 12 * 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. 24 */ 25 26#ifndef VK_UNKNOWN 27 28#define VK_UNKNOWN 0 29 30// Left mouse button 31// Right mouse button 32// Control-break processing 33// Middle mouse button (three-button mouse) 34// VK_XBUTTON1 (05) 35// VK_XBUTTON2 (06) 36 37#ifndef VK_BACK 38#define VK_BACK 0x08 39#endif 40#ifndef VK_TAB 41#define VK_TAB 0x09 42#endif 43#ifndef VK_CLEAR 44#define VK_CLEAR 0x0C 45#endif 46#ifndef VK_RETURN 47#define VK_RETURN 0x0D 48#endif 49#ifndef VK_SHIFT 50#define VK_SHIFT 0x10 51#endif 52#ifndef VK_CONTROL 53#define VK_CONTROL 0x11 // CTRL key 54#endif 55#ifndef VK_MENU 56#define VK_MENU 0x12 // ALT key 57#endif 58#ifndef VK_PAUSE 59#define VK_PAUSE 0x13 // PAUSE key 60#endif 61#ifndef VK_CAPITAL 62#define VK_CAPITAL 0x14 // CAPS LOCK key 63#endif 64#ifndef VK_KANA 65#define VK_KANA 0x15 // Input Method Editor (IME) Kana mode 66#endif 67#ifndef VK_HANGUL 68#define VK_HANGUL 0x15 // IME Hangul mode 69#endif 70#ifndef VK_JUNJA 71#define VK_JUNJA 0x17 // IME Junja mode 72#endif 73#ifndef VK_FINAL 74#define VK_FINAL 0x18 // IME final mode 75#endif 76#ifndef VK_HANJA 77#define VK_HANJA 0x19 // IME Hanja mode 78#endif 79#ifndef VK_KANJI 80#define VK_KANJI 0x19 // IME Kanji mode 81#endif 82#ifndef VK_ESCAPE 83#define VK_ESCAPE 0x1B // ESC key 84#endif 85#ifndef VK_CONVERT 86#define VK_CONVERT 0x1C // IME convert 87#endif 88#ifndef VK_NONCONVERT 89#define VK_NONCONVERT 0x1D // IME nonconvert 90#endif 91#ifndef VK_ACCEPT 92#define VK_ACCEPT 0x1E // IME accept 93#endif 94#ifndef VK_MODECHANGE 95#define VK_MODECHANGE 0x1F // IME mode change request 96#endif 97#ifndef VK_SPACE 98#define VK_SPACE 0x20 // SPACE key 99#endif 100#ifndef VK_PRIOR 101#define VK_PRIOR 0x21 // PAGE UP key 102#endif 103#ifndef VK_NEXT 104#define VK_NEXT 0x22 // PAGE DOWN key 105#endif 106#ifndef VK_END 107#define VK_END 0x23 // END key 108#endif 109#ifndef VK_HOME 110#define VK_HOME 0x24 // HOME key 111#endif 112#ifndef VK_LEFT 113#define VK_LEFT 0x25 // LEFT ARROW key 114#endif 115#ifndef VK_UP 116#define VK_UP 0x26 // UP ARROW key 117#endif 118#ifndef VK_RIGHT 119#define VK_RIGHT 0x27 // RIGHT ARROW key 120#endif 121#ifndef VK_DOWN 122#define VK_DOWN 0x28 // DOWN ARROW key 123#endif 124#ifndef VK_SELECT 125#define VK_SELECT 0x29 // SELECT key 126#endif 127#ifndef VK_PRINT 128#define VK_PRINT 0x2A // PRINT key 129#endif 130#ifndef VK_EXECUTE 131#define VK_EXECUTE 0x2B // EXECUTE key 132#endif 133#ifndef VK_SNAPSHOT 134#define VK_SNAPSHOT 0x2C // PRINT SCREEN key 135#endif 136#ifndef VK_INSERT 137#define VK_INSERT 0x2D // INS key 138#endif 139#ifndef VK_DELETE 140#define VK_DELETE 0x2E // DEL key 141#endif 142#ifndef VK_HELP 143#define VK_HELP 0x2F // HELP key 144#endif 145 146#define VK_0 0x30 147#define VK_1 0x31 148#define VK_2 0x32 149#define VK_3 0x33 150#define VK_4 0x34 151#define VK_5 0x35 152#define VK_6 0x36 153#define VK_7 0x37 154#define VK_8 0x38 155#define VK_9 0x39 156#define VK_A 0x41 157#define VK_B 0x42 158#define VK_C 0x43 159#define VK_D 0x44 160#define VK_E 0x45 161#define VK_F 0x46 162#define VK_G 0x47 163#define VK_H 0x48 164#define VK_I 0x49 165#define VK_J 0x4A 166#define VK_K 0x4B 167#define VK_L 0x4C 168#define VK_M 0x4D 169#define VK_N 0x4E 170#define VK_O 0x4F 171#define VK_P 0x50 172#define VK_Q 0x51 173#define VK_R 0x52 174#define VK_S 0x53 175#define VK_T 0x54 176#define VK_U 0x55 177#define VK_V 0x56 178#define VK_W 0x57 179#define VK_X 0x58 180#define VK_Y 0x59 181#define VK_Z 0x5A 182 183#define VK_LWIN 0x5B // Left Windows key (Microsoft Natural keyboard) 184 185#define VK_RWIN 0x5C // Right Windows key (Natural keyboard) 186 187#define VK_APPS 0x5D // Applications key (Natural keyboard) 188 189#define VK_SLEEP 0x5F // Computer Sleep key 190 191// Num pad keys 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 203#define VK_ADD 0x6B 204#define VK_SEPARATOR 0x6C 205#define VK_SUBTRACT 0x6D 206#define VK_DECIMAL 0x6E 207#define VK_DIVIDE 0x6F 208 209#define VK_F1 0x70 210#define VK_F2 0x71 211#define VK_F3 0x72 212#define VK_F4 0x73 213#define VK_F5 0x74 214#define VK_F6 0x75 215#define VK_F7 0x76 216#define VK_F8 0x77 217#define VK_F9 0x78 218#define VK_F10 0x79 219#define VK_F11 0x7A 220#define VK_F12 0x7B 221#define VK_F13 0x7C 222#define VK_F14 0x7D 223#define VK_F15 0x7E 224#define VK_F16 0x7F 225#define VK_F17 0x80 226#define VK_F18 0x81 227#define VK_F19 0x82 228#define VK_F20 0x83 229#define VK_F21 0x84 230#define VK_F22 0x85 231#define VK_F23 0x86 232#define VK_F24 0x87 233 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 242 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 261 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 264 265// Windows 2000/XP: For any country/region, the '+' key 266#define VK_OEM_PLUS 0xBB 267 268// Windows 2000/XP: For any country/region, the ',' key 269#define VK_OEM_COMMA 0xBC 270 271// Windows 2000/XP: For any country/region, the '-' key 272#define VK_OEM_MINUS 0xBD 273 274// Windows 2000/XP: For any country/region, the '.' key 275#define VK_OEM_PERIOD 0xBE 276 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 279 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 282 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 285 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 288 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 291 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 294 295// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. 296#define VK_OEM_8 0xDF 297 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 300 301// Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key 302#define VK_PROCESSKEY 0xE5 303 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 306 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 313 314#define VK_NONAME 0xFC // Reserved for future use 315 316#define VK_PA1 0xFD // VK_PA1 (FD) PA1 key 317 318#define VK_OEM_CLEAR 0xFE // Clear key 319 320#endif // VK_UNKNOWN 321