blob: 538949d5bc6cf1580d882a2c190e4ae86890a6a4 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
Mathias Agopianb93a03f82012-02-17 15:34:57 -080017#ifndef _ANDROIDFW_KEYCODE_LABELS_H
18#define _ANDROIDFW_KEYCODE_LABELS_H
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080019
Jeff Brownfd035822010-06-30 16:10:35 -070020#include <android/keycodes.h>
21
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080022struct KeycodeLabel {
23 const char *literal;
24 int value;
25};
26
27static 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 Hackborn935ae462009-04-13 16:11:55 -0700112 { "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 Project9066cfe2009-03-03 19:31:44 -0800118 { "MUTE", 91 },
Chih-Wei Huang4fedd802009-05-27 15:52:50 +0800119 { "PAGE_UP", 92 },
120 { "PAGE_DOWN", 93 },
mogimob032bc02009-10-03 03:13:56 +0900121 { "PICTSYMBOLS", 94 },
122 { "SWITCH_CHARSET", 95 },
Jeff Brownfd035822010-06-30 16:10:35 -0700123 { "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 Brown497a92c2010-09-12 17:55:08 -0700138 { "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 Brownb0418da2010-11-01 15:24:01 -0700191 { "VOLUME_MUTE", 164 },
Jason Bayer3adf4902010-11-09 14:54:55 -0800192 { "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 },
Jeff Brown49ed71d2010-12-06 17:13:33 -0800214 { "APP_SWITCH", 187 },
Jeff Browncb1404e2011-01-15 18:14:15 -0800215 { "BUTTON_1", 188 },
216 { "BUTTON_2", 189 },
217 { "BUTTON_3", 190 },
218 { "BUTTON_4", 191 },
219 { "BUTTON_5", 192 },
220 { "BUTTON_6", 193 },
221 { "BUTTON_7", 194 },
222 { "BUTTON_8", 195 },
223 { "BUTTON_9", 196 },
224 { "BUTTON_10", 197 },
225 { "BUTTON_11", 198 },
226 { "BUTTON_12", 199 },
227 { "BUTTON_13", 200 },
228 { "BUTTON_14", 201 },
229 { "BUTTON_15", 202 },
230 { "BUTTON_16", 203 },
Jeff Brown9812aed2011-03-07 17:09:51 -0800231 { "LANGUAGE_SWITCH", 204 },
232 { "MANNER_MODE", 205 },
233 { "3D_MODE", 206 },
Jeff Brown6651a632011-11-28 12:59:11 -0800234 { "CONTACTS", 207 },
235 { "CALENDAR", 208 },
236 { "MUSIC", 209 },
237 { "CALCULATOR", 210 },
Yang Chuang7511f9c2012-02-10 15:18:26 +0800238 { "ZENKAKU_HANKAKU", 211 },
239 { "EISU", 212 },
240 { "MUHENKAN", 213 },
241 { "HENKAN", 214 },
242 { "KATAKANA_HIRAGANA", 215 },
243 { "YEN", 216 },
244 { "RO", 217 },
245 { "KANA", 218 },
Jeff Brownde7a8ea2012-06-13 18:28:57 -0700246 { "ASSIST", 219 },
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800247
Jeff Brownfd035822010-06-30 16:10:35 -0700248 // NOTE: If you add a new keycode here you must also add it to several other files.
249 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800250
251 { NULL, 0 }
252};
253
Jeff Brown497a92c2010-09-12 17:55:08 -0700254// NOTE: If you edit these flags, also edit policy flags in Input.h.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800255static const KeycodeLabel FLAGS[] = {
256 { "WAKE", 0x00000001 },
257 { "WAKE_DROPPED", 0x00000002 },
258 { "SHIFT", 0x00000004 },
259 { "CAPS_LOCK", 0x00000008 },
260 { "ALT", 0x00000010 },
261 { "ALT_GR", 0x00000020 },
262 { "MENU", 0x00000040 },
263 { "LAUNCHER", 0x00000080 },
Jeff Brown0eaf3932010-10-01 14:55:30 -0700264 { "VIRTUAL", 0x00000100 },
Jeff Brown497a92c2010-09-12 17:55:08 -0700265 { "FUNCTION", 0x00000200 },
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800266 { NULL, 0 }
267};
268
Jeff Brown6f2fba42011-02-19 01:08:02 -0800269static const KeycodeLabel AXES[] = {
270 { "X", 0 },
271 { "Y", 1 },
272 { "PRESSURE", 2 },
273 { "SIZE", 3 },
274 { "TOUCH_MAJOR", 4 },
275 { "TOUCH_MINOR", 5 },
276 { "TOOL_MAJOR", 6 },
277 { "TOOL_MINOR", 7 },
278 { "ORIENTATION", 8 },
279 { "VSCROLL", 9 },
280 { "HSCROLL", 10 },
281 { "Z", 11 },
282 { "RX", 12 },
283 { "RY", 13 },
284 { "RZ", 14 },
285 { "HAT_X", 15 },
286 { "HAT_Y", 16 },
287 { "LTRIGGER", 17 },
288 { "RTRIGGER", 18 },
Jeff Brown3a22fa02011-03-04 13:07:49 -0800289 { "THROTTLE", 19 },
290 { "RUDDER", 20 },
291 { "WHEEL", 21 },
292 { "GAS", 22 },
293 { "BRAKE", 23 },
Jeff Brown65fd2512011-08-18 11:20:58 -0700294 { "DISTANCE", 24 },
295 { "TILT", 25 },
Jeff Brown6f2fba42011-02-19 01:08:02 -0800296 { "GENERIC_1", 32 },
297 { "GENERIC_2", 33 },
298 { "GENERIC_3", 34 },
299 { "GENERIC_4", 35 },
300 { "GENERIC_5", 36 },
301 { "GENERIC_6", 37 },
302 { "GENERIC_7", 38 },
303 { "GENERIC_8", 39 },
304 { "GENERIC_9", 40 },
305 { "GENERIC_10", 41 },
306 { "GENERIC_11", 42 },
307 { "GENERIC_12", 43 },
308 { "GENERIC_13", 44 },
309 { "GENERIC_14", 45 },
310 { "GENERIC_15", 46 },
311 { "GENERIC_16", 47 },
312
313 // NOTE: If you add a new axis here you must also add it to several other files.
314 // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
315
316 { NULL, -1 }
317};
318
Mathias Agopianb93a03f82012-02-17 15:34:57 -0800319#endif // _ANDROIDFW_KEYCODE_LABELS_H