blob: 496eccc032bba6a55be01f8773bdae1980f66f18 [file] [log] [blame]
Jeff Brown46b9ac0a2010-04-22 18:58:52 -07001/*
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
39extern "C" {
40#endif
41
42/*
43 * Key codes.
Jeff Brown46b9ac0a2010-04-22 18:58:52 -070044 */
45enum {
Jeff Brownfd0358292010-06-30 16:10:35 -070046 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,
Jeff Brown46b9ac0a2010-04-22 18:58:52 -0700157
Jeff Brownfd0358292010-06-30 16:10:35 -0700158 // NOTE: If you add a new keycode here you must also add it to several other files.
159 // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
Jeff Brown46b9ac0a2010-04-22 18:58:52 -0700160};
161
162#ifdef __cplusplus
163}
164#endif
165
166#endif // _ANDROID_KEYCODES_H