The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 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 _UI_KEYCODE_LABELS_H |
| 18 | #define _UI_KEYCODE_LABELS_H |
| 19 | |
Jeff Brown | fd03582 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 20 | #include <android/keycodes.h> |
| 21 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | struct KeycodeLabel { |
| 23 | const char *literal; |
| 24 | int value; |
| 25 | }; |
| 26 | |
| 27 | static const KeycodeLabel KEYCODES[] = { |
| 28 | { "SOFT_LEFT", 1 }, |
| 29 | { "SOFT_RIGHT", 2 }, |
| 30 | { "HOME", 3 }, |
| 31 | { "BACK", 4 }, |
| 32 | { "CALL", 5 }, |
| 33 | { "ENDCALL", 6 }, |
| 34 | { "0", 7 }, |
| 35 | { "1", 8 }, |
| 36 | { "2", 9 }, |
| 37 | { "3", 10 }, |
| 38 | { "4", 11 }, |
| 39 | { "5", 12 }, |
| 40 | { "6", 13 }, |
| 41 | { "7", 14 }, |
| 42 | { "8", 15 }, |
| 43 | { "9", 16 }, |
| 44 | { "STAR", 17 }, |
| 45 | { "POUND", 18 }, |
| 46 | { "DPAD_UP", 19 }, |
| 47 | { "DPAD_DOWN", 20 }, |
| 48 | { "DPAD_LEFT", 21 }, |
| 49 | { "DPAD_RIGHT", 22 }, |
| 50 | { "DPAD_CENTER", 23 }, |
| 51 | { "VOLUME_UP", 24 }, |
| 52 | { "VOLUME_DOWN", 25 }, |
| 53 | { "POWER", 26 }, |
| 54 | { "CAMERA", 27 }, |
| 55 | { "CLEAR", 28 }, |
| 56 | { "A", 29 }, |
| 57 | { "B", 30 }, |
| 58 | { "C", 31 }, |
| 59 | { "D", 32 }, |
| 60 | { "E", 33 }, |
| 61 | { "F", 34 }, |
| 62 | { "G", 35 }, |
| 63 | { "H", 36 }, |
| 64 | { "I", 37 }, |
| 65 | { "J", 38 }, |
| 66 | { "K", 39 }, |
| 67 | { "L", 40 }, |
| 68 | { "M", 41 }, |
| 69 | { "N", 42 }, |
| 70 | { "O", 43 }, |
| 71 | { "P", 44 }, |
| 72 | { "Q", 45 }, |
| 73 | { "R", 46 }, |
| 74 | { "S", 47 }, |
| 75 | { "T", 48 }, |
| 76 | { "U", 49 }, |
| 77 | { "V", 50 }, |
| 78 | { "W", 51 }, |
| 79 | { "X", 52 }, |
| 80 | { "Y", 53 }, |
| 81 | { "Z", 54 }, |
| 82 | { "COMMA", 55 }, |
| 83 | { "PERIOD", 56 }, |
| 84 | { "ALT_LEFT", 57 }, |
| 85 | { "ALT_RIGHT", 58 }, |
| 86 | { "SHIFT_LEFT", 59 }, |
| 87 | { "SHIFT_RIGHT", 60 }, |
| 88 | { "TAB", 61 }, |
| 89 | { "SPACE", 62 }, |
| 90 | { "SYM", 63 }, |
| 91 | { "EXPLORER", 64 }, |
| 92 | { "ENVELOPE", 65 }, |
| 93 | { "ENTER", 66 }, |
| 94 | { "DEL", 67 }, |
| 95 | { "GRAVE", 68 }, |
| 96 | { "MINUS", 69 }, |
| 97 | { "EQUALS", 70 }, |
| 98 | { "LEFT_BRACKET", 71 }, |
| 99 | { "RIGHT_BRACKET", 72 }, |
| 100 | { "BACKSLASH", 73 }, |
| 101 | { "SEMICOLON", 74 }, |
| 102 | { "APOSTROPHE", 75 }, |
| 103 | { "SLASH", 76 }, |
| 104 | { "AT", 77 }, |
| 105 | { "NUM", 78 }, |
| 106 | { "HEADSETHOOK", 79 }, |
| 107 | { "FOCUS", 80 }, |
| 108 | { "PLUS", 81 }, |
| 109 | { "MENU", 82 }, |
| 110 | { "NOTIFICATION", 83 }, |
| 111 | { "SEARCH", 84 }, |
Dianne Hackborn | 935ae46 | 2009-04-13 16:11:55 -0700 | [diff] [blame] | 112 | { "MEDIA_PLAY_PAUSE", 85 }, |
| 113 | { "MEDIA_STOP", 86 }, |
| 114 | { "MEDIA_NEXT", 87 }, |
| 115 | { "MEDIA_PREVIOUS", 88 }, |
| 116 | { "MEDIA_REWIND", 89 }, |
| 117 | { "MEDIA_FAST_FORWARD", 90 }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 118 | { "MUTE", 91 }, |
Chih-Wei Huang | 4fedd80 | 2009-05-27 15:52:50 +0800 | [diff] [blame] | 119 | { "PAGE_UP", 92 }, |
| 120 | { "PAGE_DOWN", 93 }, |
mogimo | b032bc0 | 2009-10-03 03:13:56 +0900 | [diff] [blame] | 121 | { "PICTSYMBOLS", 94 }, |
| 122 | { "SWITCH_CHARSET", 95 }, |
Jeff Brown | fd03582 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 123 | { "BUTTON_A", 96 }, |
| 124 | { "BUTTON_B", 97 }, |
| 125 | { "BUTTON_C", 98 }, |
| 126 | { "BUTTON_X", 99 }, |
| 127 | { "BUTTON_Y", 100 }, |
| 128 | { "BUTTON_Z", 101 }, |
| 129 | { "BUTTON_L1", 102 }, |
| 130 | { "BUTTON_R1", 103 }, |
| 131 | { "BUTTON_L2", 104 }, |
| 132 | { "BUTTON_R2", 105 }, |
| 133 | { "BUTTON_THUMBL", 106 }, |
| 134 | { "BUTTON_THUMBR", 107 }, |
| 135 | { "BUTTON_START", 108 }, |
| 136 | { "BUTTON_SELECT", 109 }, |
| 137 | { "BUTTON_MODE", 110 }, |
Jeff Brown | 497a92c | 2010-09-12 17:55:08 -0700 | [diff] [blame] | 138 | { "ESCAPE", 111 }, |
| 139 | { "FORWARD_DEL", 112 }, |
| 140 | { "CTRL_LEFT", 113 }, |
| 141 | { "CTRL_RIGHT", 114 }, |
| 142 | { "CAPS_LOCK", 115 }, |
| 143 | { "SCROLL_LOCK", 116 }, |
| 144 | { "META_LEFT", 117 }, |
| 145 | { "META_RIGHT", 118 }, |
| 146 | { "FUNCTION", 119 }, |
| 147 | { "SYSRQ", 120 }, |
| 148 | { "BREAK", 121 }, |
| 149 | { "MOVE_HOME", 122 }, |
| 150 | { "MOVE_END", 123 }, |
| 151 | { "INSERT", 124 }, |
| 152 | { "FORWARD", 125 }, |
| 153 | { "MEDIA_PLAY", 126 }, |
| 154 | { "MEDIA_PAUSE", 127 }, |
| 155 | { "MEDIA_CLOSE", 128 }, |
| 156 | { "MEDIA_EJECT", 129 }, |
| 157 | { "MEDIA_RECORD", 130 }, |
| 158 | { "F1", 131 }, |
| 159 | { "F2", 132 }, |
| 160 | { "F3", 133 }, |
| 161 | { "F4", 134 }, |
| 162 | { "F5", 135 }, |
| 163 | { "F6", 136 }, |
| 164 | { "F7", 137 }, |
| 165 | { "F8", 138 }, |
| 166 | { "F9", 139 }, |
| 167 | { "F10", 140 }, |
| 168 | { "F11", 141 }, |
| 169 | { "F12", 142 }, |
| 170 | { "NUM_LOCK", 143 }, |
| 171 | { "NUMPAD_0", 144 }, |
| 172 | { "NUMPAD_1", 145 }, |
| 173 | { "NUMPAD_2", 146 }, |
| 174 | { "NUMPAD_3", 147 }, |
| 175 | { "NUMPAD_4", 148 }, |
| 176 | { "NUMPAD_5", 149 }, |
| 177 | { "NUMPAD_6", 150 }, |
| 178 | { "NUMPAD_7", 151 }, |
| 179 | { "NUMPAD_8", 152 }, |
| 180 | { "NUMPAD_9", 153 }, |
| 181 | { "NUMPAD_DIVIDE", 154 }, |
| 182 | { "NUMPAD_MULTIPLY", 155 }, |
| 183 | { "NUMPAD_SUBTRACT", 156 }, |
| 184 | { "NUMPAD_ADD", 157 }, |
| 185 | { "NUMPAD_DOT", 158 }, |
| 186 | { "NUMPAD_COMMA", 159 }, |
| 187 | { "NUMPAD_ENTER", 160 }, |
| 188 | { "NUMPAD_EQUALS", 161 }, |
| 189 | { "NUMPAD_LEFT_PAREN", 162 }, |
| 190 | { "NUMPAD_RIGHT_PAREN", 163 }, |
Jeff Brown | b0418da | 2010-11-01 15:24:01 -0700 | [diff] [blame] | 191 | { "VOLUME_MUTE", 164 }, |
Jason Bayer | 3adf490 | 2010-11-09 14:54:55 -0800 | [diff] [blame] | 192 | { "INFO", 165 }, |
| 193 | { "CHANNEL_UP", 166 }, |
| 194 | { "CHANNEL_DOWN", 167 }, |
| 195 | { "ZOOM_IN", 168 }, |
| 196 | { "ZOOM_OUT", 169 }, |
| 197 | { "TV", 170 }, |
| 198 | { "WINDOW", 171 }, |
| 199 | { "GUIDE", 172 }, |
| 200 | { "DVR", 173 }, |
| 201 | { "BOOKMARK", 174 }, |
| 202 | { "CAPTIONS", 175 }, |
| 203 | { "SETTINGS", 176 }, |
| 204 | { "TV_POWER", 177 }, |
| 205 | { "TV_INPUT", 178 }, |
| 206 | { "STB_POWER", 179 }, |
| 207 | { "STB_INPUT", 180 }, |
| 208 | { "AVR_POWER", 181 }, |
| 209 | { "AVR_INPUT", 182 }, |
| 210 | { "PROG_RED", 183 }, |
| 211 | { "PROG_GREEN", 184 }, |
| 212 | { "PROG_YELLOW", 185 }, |
| 213 | { "PROG_BLUE", 186 }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 214 | |
Jeff Brown | fd03582 | 2010-06-30 16:10:35 -0700 | [diff] [blame] | 215 | // NOTE: If you add a new keycode here you must also add it to several other files. |
| 216 | // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 217 | |
| 218 | { NULL, 0 } |
| 219 | }; |
| 220 | |
Jeff Brown | 497a92c | 2010-09-12 17:55:08 -0700 | [diff] [blame] | 221 | // NOTE: If you edit these flags, also edit policy flags in Input.h. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 222 | static const KeycodeLabel FLAGS[] = { |
| 223 | { "WAKE", 0x00000001 }, |
| 224 | { "WAKE_DROPPED", 0x00000002 }, |
| 225 | { "SHIFT", 0x00000004 }, |
| 226 | { "CAPS_LOCK", 0x00000008 }, |
| 227 | { "ALT", 0x00000010 }, |
| 228 | { "ALT_GR", 0x00000020 }, |
| 229 | { "MENU", 0x00000040 }, |
| 230 | { "LAUNCHER", 0x00000080 }, |
Jeff Brown | 0eaf393 | 2010-10-01 14:55:30 -0700 | [diff] [blame] | 231 | { "VIRTUAL", 0x00000100 }, |
Jeff Brown | 497a92c | 2010-09-12 17:55:08 -0700 | [diff] [blame] | 232 | { "FUNCTION", 0x00000200 }, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 233 | { NULL, 0 } |
| 234 | }; |
| 235 | |
| 236 | #endif // _UI_KEYCODE_LABELS_H |