1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _ANDROID_KEYCODES_H 18 #define _ANDROID_KEYCODES_H 19 20 /****************************************************************** 21 * 22 * IMPORTANT NOTICE: 23 * 24 * This file is part of Android's set of stable system headers 25 * exposed by the Android NDK (Native Development Kit). 26 * 27 * Third-party source AND binary code relies on the definitions 28 * here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES. 29 * 30 * - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES) 31 * - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS 32 * - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY 33 * - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES 34 */ 35 36 #include <sys/types.h> 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 /* 43 * Key codes. 44 */ 45 enum { 46 AKEYCODE_UNKNOWN = 0, 47 AKEYCODE_SOFT_LEFT = 1, 48 AKEYCODE_SOFT_RIGHT = 2, 49 AKEYCODE_HOME = 3, 50 AKEYCODE_BACK = 4, 51 AKEYCODE_CALL = 5, 52 AKEYCODE_ENDCALL = 6, 53 AKEYCODE_0 = 7, 54 AKEYCODE_1 = 8, 55 AKEYCODE_2 = 9, 56 AKEYCODE_3 = 10, 57 AKEYCODE_4 = 11, 58 AKEYCODE_5 = 12, 59 AKEYCODE_6 = 13, 60 AKEYCODE_7 = 14, 61 AKEYCODE_8 = 15, 62 AKEYCODE_9 = 16, 63 AKEYCODE_STAR = 17, 64 AKEYCODE_POUND = 18, 65 AKEYCODE_DPAD_UP = 19, 66 AKEYCODE_DPAD_DOWN = 20, 67 AKEYCODE_DPAD_LEFT = 21, 68 AKEYCODE_DPAD_RIGHT = 22, 69 AKEYCODE_DPAD_CENTER = 23, 70 AKEYCODE_VOLUME_UP = 24, 71 AKEYCODE_VOLUME_DOWN = 25, 72 AKEYCODE_POWER = 26, 73 AKEYCODE_CAMERA = 27, 74 AKEYCODE_CLEAR = 28, 75 AKEYCODE_A = 29, 76 AKEYCODE_B = 30, 77 AKEYCODE_C = 31, 78 AKEYCODE_D = 32, 79 AKEYCODE_E = 33, 80 AKEYCODE_F = 34, 81 AKEYCODE_G = 35, 82 AKEYCODE_H = 36, 83 AKEYCODE_I = 37, 84 AKEYCODE_J = 38, 85 AKEYCODE_K = 39, 86 AKEYCODE_L = 40, 87 AKEYCODE_M = 41, 88 AKEYCODE_N = 42, 89 AKEYCODE_O = 43, 90 AKEYCODE_P = 44, 91 AKEYCODE_Q = 45, 92 AKEYCODE_R = 46, 93 AKEYCODE_S = 47, 94 AKEYCODE_T = 48, 95 AKEYCODE_U = 49, 96 AKEYCODE_V = 50, 97 AKEYCODE_W = 51, 98 AKEYCODE_X = 52, 99 AKEYCODE_Y = 53, 100 AKEYCODE_Z = 54, 101 AKEYCODE_COMMA = 55, 102 AKEYCODE_PERIOD = 56, 103 AKEYCODE_ALT_LEFT = 57, 104 AKEYCODE_ALT_RIGHT = 58, 105 AKEYCODE_SHIFT_LEFT = 59, 106 AKEYCODE_SHIFT_RIGHT = 60, 107 AKEYCODE_TAB = 61, 108 AKEYCODE_SPACE = 62, 109 AKEYCODE_SYM = 63, 110 AKEYCODE_EXPLORER = 64, 111 AKEYCODE_ENVELOPE = 65, 112 AKEYCODE_ENTER = 66, 113 AKEYCODE_DEL = 67, 114 AKEYCODE_GRAVE = 68, 115 AKEYCODE_MINUS = 69, 116 AKEYCODE_EQUALS = 70, 117 AKEYCODE_LEFT_BRACKET = 71, 118 AKEYCODE_RIGHT_BRACKET = 72, 119 AKEYCODE_BACKSLASH = 73, 120 AKEYCODE_SEMICOLON = 74, 121 AKEYCODE_APOSTROPHE = 75, 122 AKEYCODE_SLASH = 76, 123 AKEYCODE_AT = 77, 124 AKEYCODE_NUM = 78, 125 AKEYCODE_HEADSETHOOK = 79, 126 AKEYCODE_FOCUS = 80, // *Camera* focus 127 AKEYCODE_PLUS = 81, 128 AKEYCODE_MENU = 82, 129 AKEYCODE_NOTIFICATION = 83, 130 AKEYCODE_SEARCH = 84, 131 AKEYCODE_MEDIA_PLAY_PAUSE= 85, 132 AKEYCODE_MEDIA_STOP = 86, 133 AKEYCODE_MEDIA_NEXT = 87, 134 AKEYCODE_MEDIA_PREVIOUS = 88, 135 AKEYCODE_MEDIA_REWIND = 89, 136 AKEYCODE_MEDIA_FAST_FORWARD = 90, 137 AKEYCODE_MUTE = 91, 138 AKEYCODE_PAGE_UP = 92, 139 AKEYCODE_PAGE_DOWN = 93, 140 AKEYCODE_PICTSYMBOLS = 94, 141 AKEYCODE_SWITCH_CHARSET = 95, 142 AKEYCODE_BUTTON_A = 96, 143 AKEYCODE_BUTTON_B = 97, 144 AKEYCODE_BUTTON_C = 98, 145 AKEYCODE_BUTTON_X = 99, 146 AKEYCODE_BUTTON_Y = 100, 147 AKEYCODE_BUTTON_Z = 101, 148 AKEYCODE_BUTTON_L1 = 102, 149 AKEYCODE_BUTTON_R1 = 103, 150 AKEYCODE_BUTTON_L2 = 104, 151 AKEYCODE_BUTTON_R2 = 105, 152 AKEYCODE_BUTTON_THUMBL = 106, 153 AKEYCODE_BUTTON_THUMBR = 107, 154 AKEYCODE_BUTTON_START = 108, 155 AKEYCODE_BUTTON_SELECT = 109, 156 AKEYCODE_BUTTON_MODE = 110, 157 AKEYCODE_ESCAPE = 111, 158 AKEYCODE_FORWARD_DEL = 112, 159 AKEYCODE_CTRL_LEFT = 113, 160 AKEYCODE_CTRL_RIGHT = 114, 161 AKEYCODE_CAPS_LOCK = 115, 162 AKEYCODE_SCROLL_LOCK = 116, 163 AKEYCODE_META_LEFT = 117, 164 AKEYCODE_META_RIGHT = 118, 165 AKEYCODE_FUNCTION = 119, 166 AKEYCODE_SYSRQ = 120, 167 AKEYCODE_BREAK = 121, 168 AKEYCODE_MOVE_HOME = 122, 169 AKEYCODE_MOVE_END = 123, 170 AKEYCODE_INSERT = 124, 171 AKEYCODE_FORWARD = 125, 172 AKEYCODE_MEDIA_PLAY = 126, 173 AKEYCODE_MEDIA_PAUSE = 127, 174 AKEYCODE_MEDIA_CLOSE = 128, 175 AKEYCODE_MEDIA_EJECT = 129, 176 AKEYCODE_MEDIA_RECORD = 130, 177 AKEYCODE_F1 = 131, 178 AKEYCODE_F2 = 132, 179 AKEYCODE_F3 = 133, 180 AKEYCODE_F4 = 134, 181 AKEYCODE_F5 = 135, 182 AKEYCODE_F6 = 136, 183 AKEYCODE_F7 = 137, 184 AKEYCODE_F8 = 138, 185 AKEYCODE_F9 = 139, 186 AKEYCODE_F10 = 140, 187 AKEYCODE_F11 = 141, 188 AKEYCODE_F12 = 142, 189 AKEYCODE_NUM_LOCK = 143, 190 AKEYCODE_NUMPAD_0 = 144, 191 AKEYCODE_NUMPAD_1 = 145, 192 AKEYCODE_NUMPAD_2 = 146, 193 AKEYCODE_NUMPAD_3 = 147, 194 AKEYCODE_NUMPAD_4 = 148, 195 AKEYCODE_NUMPAD_5 = 149, 196 AKEYCODE_NUMPAD_6 = 150, 197 AKEYCODE_NUMPAD_7 = 151, 198 AKEYCODE_NUMPAD_8 = 152, 199 AKEYCODE_NUMPAD_9 = 153, 200 AKEYCODE_NUMPAD_DIVIDE = 154, 201 AKEYCODE_NUMPAD_MULTIPLY = 155, 202 AKEYCODE_NUMPAD_SUBTRACT = 156, 203 AKEYCODE_NUMPAD_ADD = 157, 204 AKEYCODE_NUMPAD_DOT = 158, 205 AKEYCODE_NUMPAD_COMMA = 159, 206 AKEYCODE_NUMPAD_ENTER = 160, 207 AKEYCODE_NUMPAD_EQUALS = 161, 208 AKEYCODE_NUMPAD_LEFT_PAREN = 162, 209 AKEYCODE_NUMPAD_RIGHT_PAREN = 163, 210 AKEYCODE_VOLUME_MUTE = 164, 211 AKEYCODE_INFO = 165, 212 AKEYCODE_CHANNEL_UP = 166, 213 AKEYCODE_CHANNEL_DOWN = 167, 214 AKEYCODE_ZOOM_IN = 168, 215 AKEYCODE_ZOOM_OUT = 169, 216 AKEYCODE_TV = 170, 217 AKEYCODE_WINDOW = 171, 218 AKEYCODE_GUIDE = 172, 219 AKEYCODE_DVR = 173, 220 AKEYCODE_BOOKMARK = 174, 221 AKEYCODE_CAPTIONS = 175, 222 AKEYCODE_SETTINGS = 176, 223 AKEYCODE_TV_POWER = 177, 224 AKEYCODE_TV_INPUT = 178, 225 AKEYCODE_STB_POWER = 179, 226 AKEYCODE_STB_INPUT = 180, 227 AKEYCODE_AVR_POWER = 181, 228 AKEYCODE_AVR_INPUT = 182, 229 AKEYCODE_PROG_RED = 183, 230 AKEYCODE_PROG_GREEN = 184, 231 AKEYCODE_PROG_YELLOW = 185, 232 AKEYCODE_PROG_BLUE = 186, 233 AKEYCODE_APP_SWITCH = 187, 234 AKEYCODE_BUTTON_1 = 188, 235 AKEYCODE_BUTTON_2 = 189, 236 AKEYCODE_BUTTON_3 = 190, 237 AKEYCODE_BUTTON_4 = 191, 238 AKEYCODE_BUTTON_5 = 192, 239 AKEYCODE_BUTTON_6 = 193, 240 AKEYCODE_BUTTON_7 = 194, 241 AKEYCODE_BUTTON_8 = 195, 242 AKEYCODE_BUTTON_9 = 196, 243 AKEYCODE_BUTTON_10 = 197, 244 AKEYCODE_BUTTON_11 = 198, 245 AKEYCODE_BUTTON_12 = 199, 246 AKEYCODE_BUTTON_13 = 200, 247 AKEYCODE_BUTTON_14 = 201, 248 AKEYCODE_BUTTON_15 = 202, 249 AKEYCODE_BUTTON_16 = 203, 250 AKEYCODE_LANGUAGE_SWITCH = 204, 251 AKEYCODE_MANNER_MODE = 205, 252 AKEYCODE_3D_MODE = 206, 253 AKEYCODE_CONTACTS = 207, 254 AKEYCODE_CALENDAR = 208, 255 AKEYCODE_MUSIC = 209, 256 AKEYCODE_CALCULATOR = 210, 257 AKEYCODE_ZENKAKU_HANKAKU = 211, 258 AKEYCODE_EISU = 212, 259 AKEYCODE_MUHENKAN = 213, 260 AKEYCODE_HENKAN = 214, 261 AKEYCODE_KATAKANA_HIRAGANA = 215, 262 AKEYCODE_YEN = 216, 263 AKEYCODE_RO = 217, 264 AKEYCODE_KANA = 218, 265 AKEYCODE_ASSIST = 219, 266 AKEYCODE_BRIGHTNESS_DOWN = 220, 267 AKEYCODE_BRIGHTNESS_UP = 221, 268 AKEYCODE_MEDIA_AUDIO_TRACK = 222, 269 AKEYCODE_SLEEP = 223, 270 AKEYCODE_WAKEUP = 224, 271 AKEYCODE_PAIRING = 225, 272 AKEYCODE_MEDIA_TOP_MENU = 226, 273 AKEYCODE_11 = 227, 274 AKEYCODE_12 = 228, 275 AKEYCODE_LAST_CHANNEL = 229, 276 AKEYCODE_TV_DATA_SERVICE = 230, 277 AKEYCODE_VOICE_ASSIST = 231, 278 AKEYCODE_TV_RADIO_SERVICE = 232, 279 AKEYCODE_TV_TELETEXT = 233, 280 AKEYCODE_TV_NUMBER_ENTRY = 234, 281 AKEYCODE_TV_TERRESTRIAL_ANALOG = 235, 282 AKEYCODE_TV_TERRESTRIAL_DIGITAL = 236, 283 AKEYCODE_TV_SATELLITE = 237, 284 AKEYCODE_TV_SATELLITE_BS = 238, 285 AKEYCODE_TV_SATELLITE_CS = 239, 286 AKEYCODE_TV_SATELLITE_SERVICE = 240, 287 AKEYCODE_TV_NETWORK = 241, 288 AKEYCODE_TV_ANTENNA_CABLE = 242, 289 AKEYCODE_TV_INPUT_HDMI_1 = 243, 290 AKEYCODE_TV_INPUT_HDMI_2 = 244, 291 AKEYCODE_TV_INPUT_HDMI_3 = 245, 292 AKEYCODE_TV_INPUT_HDMI_4 = 246, 293 AKEYCODE_TV_INPUT_COMPOSITE_1 = 247, 294 AKEYCODE_TV_INPUT_COMPOSITE_2 = 248, 295 AKEYCODE_TV_INPUT_COMPONENT_1 = 249, 296 AKEYCODE_TV_INPUT_COMPONENT_2 = 250, 297 AKEYCODE_TV_INPUT_VGA_1 = 251, 298 AKEYCODE_TV_AUDIO_DESCRIPTION = 252, 299 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253, 300 AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254, 301 AKEYCODE_TV_ZOOM_MODE = 255, 302 AKEYCODE_TV_CONTENTS_MENU = 256, 303 AKEYCODE_TV_MEDIA_CONTEXT_MENU = 257, 304 AKEYCODE_TV_TIMER_PROGRAMMING = 258, 305 AKEYCODE_HELP = 259 306 307 // NOTE: If you add a new keycode here you must also add it to several other files. 308 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. 309 }; 310 311 #ifdef __cplusplus 312 } 313 #endif 314 315 #endif // _ANDROID_KEYCODES_H 316