• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
267     // NOTE: If you add a new keycode here you must also add it to several other files.
268     //       Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
269 };
270 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275 #endif // _ANDROID_KEYCODES_H
276