1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 /* 6 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com. All rights reserved. 7 * Copyright (C) 2008, 2009 Google Inc. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR 25 * PROFITS, OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 26 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 #ifndef UI_EVENTS_KEYCODES_KEYBOARD_CODES_POSIX_H_ 32 #define UI_EVENTS_KEYCODES_KEYBOARD_CODES_POSIX_H_ 33 34 namespace ui { 35 36 enum KeyboardCode { 37 VKEY_BACK = 0x08, 38 VKEY_TAB = 0x09, 39 VKEY_BACKTAB = 0x0A, 40 VKEY_CLEAR = 0x0C, 41 VKEY_RETURN = 0x0D, 42 VKEY_SHIFT = 0x10, 43 VKEY_CONTROL = 0x11, 44 VKEY_MENU = 0x12, 45 VKEY_PAUSE = 0x13, 46 VKEY_CAPITAL = 0x14, 47 VKEY_KANA = 0x15, 48 VKEY_HANGUL = 0x15, 49 VKEY_JUNJA = 0x17, 50 VKEY_FINAL = 0x18, 51 VKEY_HANJA = 0x19, 52 VKEY_KANJI = 0x19, 53 VKEY_ESCAPE = 0x1B, 54 VKEY_CONVERT = 0x1C, 55 VKEY_NONCONVERT = 0x1D, 56 VKEY_ACCEPT = 0x1E, 57 VKEY_MODECHANGE = 0x1F, 58 VKEY_SPACE = 0x20, 59 VKEY_PRIOR = 0x21, 60 VKEY_NEXT = 0x22, 61 VKEY_END = 0x23, 62 VKEY_HOME = 0x24, 63 VKEY_LEFT = 0x25, 64 VKEY_UP = 0x26, 65 VKEY_RIGHT = 0x27, 66 VKEY_DOWN = 0x28, 67 VKEY_SELECT = 0x29, 68 VKEY_PRINT = 0x2A, 69 VKEY_EXECUTE = 0x2B, 70 VKEY_SNAPSHOT = 0x2C, 71 VKEY_INSERT = 0x2D, 72 VKEY_DELETE = 0x2E, 73 VKEY_HELP = 0x2F, 74 VKEY_0 = 0x30, 75 VKEY_1 = 0x31, 76 VKEY_2 = 0x32, 77 VKEY_3 = 0x33, 78 VKEY_4 = 0x34, 79 VKEY_5 = 0x35, 80 VKEY_6 = 0x36, 81 VKEY_7 = 0x37, 82 VKEY_8 = 0x38, 83 VKEY_9 = 0x39, 84 VKEY_A = 0x41, 85 VKEY_B = 0x42, 86 VKEY_C = 0x43, 87 VKEY_D = 0x44, 88 VKEY_E = 0x45, 89 VKEY_F = 0x46, 90 VKEY_G = 0x47, 91 VKEY_H = 0x48, 92 VKEY_I = 0x49, 93 VKEY_J = 0x4A, 94 VKEY_K = 0x4B, 95 VKEY_L = 0x4C, 96 VKEY_M = 0x4D, 97 VKEY_N = 0x4E, 98 VKEY_O = 0x4F, 99 VKEY_P = 0x50, 100 VKEY_Q = 0x51, 101 VKEY_R = 0x52, 102 VKEY_S = 0x53, 103 VKEY_T = 0x54, 104 VKEY_U = 0x55, 105 VKEY_V = 0x56, 106 VKEY_W = 0x57, 107 VKEY_X = 0x58, 108 VKEY_Y = 0x59, 109 VKEY_Z = 0x5A, 110 VKEY_LWIN = 0x5B, 111 VKEY_COMMAND = VKEY_LWIN, // Provide the Mac name for convenience. 112 VKEY_RWIN = 0x5C, 113 VKEY_APPS = 0x5D, 114 VKEY_SLEEP = 0x5F, 115 VKEY_NUMPAD0 = 0x60, 116 VKEY_NUMPAD1 = 0x61, 117 VKEY_NUMPAD2 = 0x62, 118 VKEY_NUMPAD3 = 0x63, 119 VKEY_NUMPAD4 = 0x64, 120 VKEY_NUMPAD5 = 0x65, 121 VKEY_NUMPAD6 = 0x66, 122 VKEY_NUMPAD7 = 0x67, 123 VKEY_NUMPAD8 = 0x68, 124 VKEY_NUMPAD9 = 0x69, 125 VKEY_MULTIPLY = 0x6A, 126 VKEY_ADD = 0x6B, 127 VKEY_SEPARATOR = 0x6C, 128 VKEY_SUBTRACT = 0x6D, 129 VKEY_DECIMAL = 0x6E, 130 VKEY_DIVIDE = 0x6F, 131 VKEY_F1 = 0x70, 132 VKEY_F2 = 0x71, 133 VKEY_F3 = 0x72, 134 VKEY_F4 = 0x73, 135 VKEY_F5 = 0x74, 136 VKEY_F6 = 0x75, 137 VKEY_F7 = 0x76, 138 VKEY_F8 = 0x77, 139 VKEY_F9 = 0x78, 140 VKEY_F10 = 0x79, 141 VKEY_F11 = 0x7A, 142 VKEY_F12 = 0x7B, 143 VKEY_F13 = 0x7C, 144 VKEY_F14 = 0x7D, 145 VKEY_F15 = 0x7E, 146 VKEY_F16 = 0x7F, 147 VKEY_F17 = 0x80, 148 VKEY_F18 = 0x81, 149 VKEY_F19 = 0x82, 150 VKEY_F20 = 0x83, 151 VKEY_F21 = 0x84, 152 VKEY_F22 = 0x85, 153 VKEY_F23 = 0x86, 154 VKEY_F24 = 0x87, 155 VKEY_NUMLOCK = 0x90, 156 VKEY_SCROLL = 0x91, 157 VKEY_LSHIFT = 0xA0, 158 VKEY_RSHIFT = 0xA1, 159 VKEY_LCONTROL = 0xA2, 160 VKEY_RCONTROL = 0xA3, 161 VKEY_LMENU = 0xA4, 162 VKEY_RMENU = 0xA5, 163 VKEY_BROWSER_BACK = 0xA6, 164 VKEY_BROWSER_FORWARD = 0xA7, 165 VKEY_BROWSER_REFRESH = 0xA8, 166 VKEY_BROWSER_STOP = 0xA9, 167 VKEY_BROWSER_SEARCH = 0xAA, 168 VKEY_BROWSER_FAVORITES = 0xAB, 169 VKEY_BROWSER_HOME = 0xAC, 170 VKEY_VOLUME_MUTE = 0xAD, 171 VKEY_VOLUME_DOWN = 0xAE, 172 VKEY_VOLUME_UP = 0xAF, 173 VKEY_MEDIA_NEXT_TRACK = 0xB0, 174 VKEY_MEDIA_PREV_TRACK = 0xB1, 175 VKEY_MEDIA_STOP = 0xB2, 176 VKEY_MEDIA_PLAY_PAUSE = 0xB3, 177 VKEY_MEDIA_LAUNCH_MAIL = 0xB4, 178 VKEY_MEDIA_LAUNCH_MEDIA_SELECT = 0xB5, 179 VKEY_MEDIA_LAUNCH_APP1 = 0xB6, 180 VKEY_MEDIA_LAUNCH_APP2 = 0xB7, 181 VKEY_OEM_1 = 0xBA, 182 VKEY_OEM_PLUS = 0xBB, 183 VKEY_OEM_COMMA = 0xBC, 184 VKEY_OEM_MINUS = 0xBD, 185 VKEY_OEM_PERIOD = 0xBE, 186 VKEY_OEM_2 = 0xBF, 187 VKEY_OEM_3 = 0xC0, 188 VKEY_OEM_4 = 0xDB, 189 VKEY_OEM_5 = 0xDC, 190 VKEY_OEM_6 = 0xDD, 191 VKEY_OEM_7 = 0xDE, 192 VKEY_OEM_8 = 0xDF, 193 VKEY_OEM_102 = 0xE2, 194 VKEY_OEM_103 = 0xE3, // GTV KEYCODE_MEDIA_REWIND 195 VKEY_OEM_104 = 0xE4, // GTV KEYCODE_MEDIA_FAST_FORWARD 196 VKEY_PROCESSKEY = 0xE5, 197 VKEY_PACKET = 0xE7, 198 VKEY_DBE_SBCSCHAR = 0xF3, 199 VKEY_DBE_DBCSCHAR = 0xF4, 200 VKEY_ATTN = 0xF6, 201 VKEY_CRSEL = 0xF7, 202 VKEY_EXSEL = 0xF8, 203 VKEY_EREOF = 0xF9, 204 VKEY_PLAY = 0xFA, 205 VKEY_ZOOM = 0xFB, 206 VKEY_NONAME = 0xFC, 207 VKEY_PA1 = 0xFD, 208 VKEY_OEM_CLEAR = 0xFE, 209 VKEY_UNKNOWN = 0, 210 211 // POSIX specific VKEYs. Note that as of Windows SDK 7.1, 0x97-9F, 0xD8-DA, 212 // and 0xE8 are unassigned. 213 VKEY_WLAN = 0x97, 214 VKEY_POWER = 0x98, 215 VKEY_BRIGHTNESS_DOWN = 0xD8, 216 VKEY_BRIGHTNESS_UP = 0xD9, 217 VKEY_KBD_BRIGHTNESS_DOWN = 0xDA, 218 VKEY_KBD_BRIGHTNESS_UP = 0xE8, 219 220 // Windows does not have a specific key code for AltGr. We use the unused 0xE1 221 // (VK_OEM_AX) code to represent AltGr, matching the behaviour of Firefox on 222 // Linux. 223 VKEY_ALTGR = 0xE1, 224 #if defined(USE_X11) 225 // Windows does not have a specific key code for Compose. We use the unused 226 // 0xE6 (VK_ICO_CLEAR) code to represent Compose. 227 VKEY_COMPOSE = 0xE6, 228 #endif 229 }; 230 231 } // namespace ui 232 233 #endif // UI_EVENTS_KEYCODES_KEYBOARD_CODES_POSIX_H_ 234