blob: 73f5863392da9baa5d031502af4897150603b88f [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
17#ifndef _UI_KEYCODE_LABELS_H
18#define _UI_KEYCODE_LABELS_H
19
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 },
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800192
Jeff Brownfd035822010-06-30 16:10:35 -0700193 // NOTE: If you add a new keycode here you must also add it to several other files.
194 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800195
196 { NULL, 0 }
197};
198
Jeff Brown497a92c2010-09-12 17:55:08 -0700199// NOTE: If you edit these flags, also edit policy flags in Input.h.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800200static const KeycodeLabel FLAGS[] = {
201 { "WAKE", 0x00000001 },
202 { "WAKE_DROPPED", 0x00000002 },
203 { "SHIFT", 0x00000004 },
204 { "CAPS_LOCK", 0x00000008 },
205 { "ALT", 0x00000010 },
206 { "ALT_GR", 0x00000020 },
207 { "MENU", 0x00000040 },
208 { "LAUNCHER", 0x00000080 },
Jeff Brown0eaf3932010-10-01 14:55:30 -0700209 { "VIRTUAL", 0x00000100 },
Jeff Brown497a92c2010-09-12 17:55:08 -0700210 { "FUNCTION", 0x00000200 },
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800211 { NULL, 0 }
212};
213
214#endif // _UI_KEYCODE_LABELS_H