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 // Undef macros which are also defined in MinGW/include/winuser.h to aviod gcc redefinition warning 31 // https://bugs.webkit.org/show_bug.cgi?id=43360 32 #if COMPILER(MINGW) 33 #undef VK_BACK 34 #undef VK_TAB 35 #undef VK_CLEAR 36 #undef VK_RETURN 37 #undef VK_SHIFT 38 #undef VK_CONTROL 39 #undef VK_MENU 40 #undef VK_PAUSE 41 #undef VK_CAPITAL 42 #undef VK_SPACE 43 #undef VK_PRIOR 44 #undef VK_NEXT 45 #undef VK_END 46 #undef VK_HOME 47 #undef VK_LEFT 48 #undef VK_UP 49 #undef VK_RIGHT 50 #undef VK_DOWN 51 #undef VK_SELECT 52 #undef VK_PRINT 53 #undef VK_EXECUTE 54 #undef VK_SNAPSHOT 55 #undef VK_INSERT 56 #undef VK_DELETE 57 #undef VK_HELP 58 #endif // COMPILER(MINGW) 59 60 // Left mouse button 61 // Right mouse button 62 // Control-break processing 63 // Middle mouse button (three-button mouse) 64 // VK_XBUTTON1 (05) 65 // VK_XBUTTON2 (06) 66 67 #define VK_BACK 0x08 68 #define VK_TAB 0x09 69 #define VK_CLEAR 0x0C 70 #define VK_RETURN 0x0D 71 #define VK_SHIFT 0x10 72 #define VK_CONTROL 0x11 // CTRL key 73 #define VK_MENU 0x12 // ALT key 74 #define VK_PAUSE 0x13 // PAUSE key 75 #define VK_CAPITAL 0x14 // CAPS LOCK key 76 #define VK_KANA 0x15 // Input Method Editor (IME) Kana mode 77 #define VK_HANGUL 0x15 // IME Hangul mode 78 #define VK_JUNJA 0x17 // IME Junja mode 79 #define VK_FINAL 0x18 // IME final mode 80 #define VK_HANJA 0x19 // IME Hanja mode 81 #define VK_KANJI 0x19 // IME Kanji mode 82 #define VK_ESCAPE 0x1B // ESC key 83 #define VK_CONVERT 0x1C // IME convert 84 #define VK_NONCONVERT 0x1D // IME nonconvert 85 #define VK_ACCEPT 0x1E // IME accept 86 #define VK_MODECHANGE 0x1F // IME mode change request 87 #define VK_SPACE 0x20 // SPACE key 88 #define VK_PRIOR 0x21 // PAGE UP key 89 #define VK_NEXT 0x22 // PAGE DOWN key 90 #define VK_END 0x23 // END key 91 #define VK_HOME 0x24 // HOME key 92 #define VK_LEFT 0x25 // LEFT ARROW key 93 #define VK_UP 0x26 // UP ARROW key 94 #define VK_RIGHT 0x27 // RIGHT ARROW key 95 #define VK_DOWN 0x28 // DOWN ARROW key 96 #define VK_SELECT 0x29 // SELECT key 97 #define VK_PRINT 0x2A // PRINT key 98 #define VK_EXECUTE 0x2B // EXECUTE key 99 #define VK_SNAPSHOT 0x2C // PRINT SCREEN key 100 #define VK_INSERT 0x2D // INS key 101 #define VK_DELETE 0x2E // DEL key 102 #define VK_HELP 0x2F // HELP key 103 104 #define VK_0 0x30 105 #define VK_1 0x31 106 #define VK_2 0x32 107 #define VK_3 0x33 108 #define VK_4 0x34 109 #define VK_5 0x35 110 #define VK_6 0x36 111 #define VK_7 0x37 112 #define VK_8 0x38 113 #define VK_9 0x39 114 #define VK_A 0x41 115 #define VK_B 0x42 116 #define VK_C 0x43 117 #define VK_D 0x44 118 #define VK_E 0x45 119 #define VK_F 0x46 120 #define VK_G 0x47 121 #define VK_H 0x48 122 #define VK_I 0x49 123 #define VK_J 0x4A 124 #define VK_K 0x4B 125 #define VK_L 0x4C 126 #define VK_M 0x4D 127 #define VK_N 0x4E 128 #define VK_O 0x4F 129 #define VK_P 0x50 130 #define VK_Q 0x51 131 #define VK_R 0x52 132 #define VK_S 0x53 133 #define VK_T 0x54 134 #define VK_U 0x55 135 #define VK_V 0x56 136 #define VK_W 0x57 137 #define VK_X 0x58 138 #define VK_Y 0x59 139 #define VK_Z 0x5A 140 141 #define VK_LWIN 0x5B // Left Windows key (Microsoft Natural keyboard) 142 143 #define VK_RWIN 0x5C // Right Windows key (Natural keyboard) 144 145 #define VK_APPS 0x5D // Applications key (Natural keyboard) 146 147 #define VK_SLEEP 0x5F // Computer Sleep key 148 149 // Num pad keys 150 #define VK_NUMPAD0 0x60 151 #define VK_NUMPAD1 0x61 152 #define VK_NUMPAD2 0x62 153 #define VK_NUMPAD3 0x63 154 #define VK_NUMPAD4 0x64 155 #define VK_NUMPAD5 0x65 156 #define VK_NUMPAD6 0x66 157 #define VK_NUMPAD7 0x67 158 #define VK_NUMPAD8 0x68 159 #define VK_NUMPAD9 0x69 160 #define VK_MULTIPLY 0x6A 161 #define VK_ADD 0x6B 162 #define VK_SEPARATOR 0x6C 163 #define VK_SUBTRACT 0x6D 164 #define VK_DECIMAL 0x6E 165 #define VK_DIVIDE 0x6F 166 167 #define VK_F1 0x70 168 #define VK_F2 0x71 169 #define VK_F3 0x72 170 #define VK_F4 0x73 171 #define VK_F5 0x74 172 #define VK_F6 0x75 173 #define VK_F7 0x76 174 #define VK_F8 0x77 175 #define VK_F9 0x78 176 #define VK_F10 0x79 177 #define VK_F11 0x7A 178 #define VK_F12 0x7B 179 #define VK_F13 0x7C 180 #define VK_F14 0x7D 181 #define VK_F15 0x7E 182 #define VK_F16 0x7F 183 #define VK_F17 0x80 184 #define VK_F18 0x81 185 #define VK_F19 0x82 186 #define VK_F20 0x83 187 #define VK_F21 0x84 188 #define VK_F22 0x85 189 #define VK_F23 0x86 190 #define VK_F24 0x87 191 192 #define VK_NUMLOCK 0x90 193 #define VK_SCROLL 0x91 194 #define VK_LSHIFT 0xA0 195 #define VK_RSHIFT 0xA1 196 #define VK_LCONTROL 0xA2 197 #define VK_RCONTROL 0xA3 198 #define VK_LMENU 0xA4 199 #define VK_RMENU 0xA5 200 201 #define VK_BROWSER_BACK 0xA6 // Windows 2000/XP: Browser Back key 202 #define VK_BROWSER_FORWARD 0xA7 // Windows 2000/XP: Browser Forward key 203 #define VK_BROWSER_REFRESH 0xA8 // Windows 2000/XP: Browser Refresh key 204 #define VK_BROWSER_STOP 0xA9 // Windows 2000/XP: Browser Stop key 205 #define VK_BROWSER_SEARCH 0xAA // Windows 2000/XP: Browser Search key 206 #define VK_BROWSER_FAVORITES 0xAB // Windows 2000/XP: Browser Favorites key 207 #define VK_BROWSER_HOME 0xAC // Windows 2000/XP: Browser Start and Home key 208 #define VK_VOLUME_MUTE 0xAD // Windows 2000/XP: Volume Mute key 209 #define VK_VOLUME_DOWN 0xAE // Windows 2000/XP: Volume Down key 210 #define VK_VOLUME_UP 0xAF // Windows 2000/XP: Volume Up key 211 #define VK_MEDIA_NEXT_TRACK 0xB0 // Windows 2000/XP: Next Track key 212 #define VK_MEDIA_PREV_TRACK 0xB1 // Windows 2000/XP: Previous Track key 213 #define VK_MEDIA_STOP 0xB2 // Windows 2000/XP: Stop Media key 214 #define VK_MEDIA_PLAY_PAUSE 0xB3 // Windows 2000/XP: Play/Pause Media key 215 #define VK_MEDIA_LAUNCH_MAIL 0xB4 // Windows 2000/XP: Start Mail key 216 #define VK_MEDIA_LAUNCH_MEDIA_SELECT 0xB5 // Windows 2000/XP: Select Media key 217 #define VK_MEDIA_LAUNCH_APP1 0xB6 // VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key 218 #define VK_MEDIA_LAUNCH_APP2 0xB7 // VK_LAUNCH_APP2 (B7) Windows 2000/XP: Start Application 2 key 219 220 // VK_OEM_1 (BA) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ';:' key 221 #define VK_OEM_1 0xBA 222 223 // Windows 2000/XP: For any country/region, the '+' key 224 #define VK_OEM_PLUS 0xBB 225 226 // Windows 2000/XP: For any country/region, the ',' key 227 #define VK_OEM_COMMA 0xBC 228 229 // Windows 2000/XP: For any country/region, the '-' key 230 #define VK_OEM_MINUS 0xBD 231 232 // Windows 2000/XP: For any country/region, the '.' key 233 #define VK_OEM_PERIOD 0xBE 234 235 // VK_OEM_2 (BF) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '/?' key 236 #define VK_OEM_2 0xBF 237 238 // VK_OEM_3 (C0) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '`~' key 239 #define VK_OEM_3 0xC0 240 241 // VK_OEM_4 (DB) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '[{' key 242 #define VK_OEM_4 0xDB 243 244 // VK_OEM_5 (DC) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the '\|' key 245 #define VK_OEM_5 0xDC 246 247 // VK_OEM_6 (DD) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the ']}' key 248 #define VK_OEM_6 0xDD 249 250 // 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 251 #define VK_OEM_7 0xDE 252 253 // VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard. 254 #define VK_OEM_8 0xDF 255 256 // VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard 257 #define VK_OEM_102 0xE2 258 259 // Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key 260 #define VK_PROCESSKEY 0xE5 261 262 // 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 263 #define VK_PACKET 0xE7 264 265 #define VK_ATTN 0xF6 // Attn key 266 #define VK_CRSEL 0xF7 // CrSel key 267 #define VK_EXSEL 0xF8 // ExSel key 268 #define VK_EREOF 0xF9 // Erase EOF key 269 #define VK_PLAY 0xFA // Play key 270 #define VK_ZOOM 0xFB // Zoom key 271 272 #define VK_NONAME 0xFC // Reserved for future use 273 274 #define VK_PA1 0xFD // VK_PA1 (FD) PA1 key 275 276 #define VK_OEM_CLEAR 0xFE // Clear key 277 278 #endif // VK_UNKNOWN 279