2 * Copyright (C) 2008 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef _UI_KEYCODE_LABELS_H
18 #define _UI_KEYCODE_LABELS_H
25 static const KeycodeLabel KEYCODES[] = {
48 { "DPAD_CENTER", 23 },
50 { "VOLUME_DOWN", 25 },
85 { "SHIFT_RIGHT", 60 },
96 { "LEFT_BRACKET", 71 },
97 { "RIGHT_BRACKET", 72 },
100 { "APOSTROPHE", 75 },
104 { "HEADSETHOOK", 79 },
108 { "NOTIFICATION", 83 },
110 { "MEDIA_PLAY_PAUSE", 85 },
111 { "MEDIA_STOP", 86 },
112 { "MEDIA_NEXT", 87 },
113 { "MEDIA_PREVIOUS", 88 },
114 { "MEDIA_REWIND", 89 },
115 { "MEDIA_FAST_FORWARD", 90 },
119 { "VOLUME_MUTE", 94},
123 // NOTE: If you add a new keycode here you must also add it to:
124 // (enum KeyCode, in this file)
125 // frameworks/base/core/java/android/view/KeyEvent.java
126 // tools/puppet_master/PuppetMaster.nav_keys.py
127 // frameworks/base/core/res/res/values/attrs.xml
132 // These constants need to match the above mappings.
133 typedef enum KeyCode {
136 kKeyCodeSoftLeft = 1,
137 kKeyCodeSoftRight = 2,
155 kKeyCodeDpadDown = 20,
156 kKeyCodeDpadLeft = 21,
157 kKeyCodeDpadRight = 22,
158 kKeyCodeDpadCenter = 23,
159 kKeyCodeVolumeUp = 24,
160 kKeyCodeVolumeDown = 25,
192 kKeyCodeAltLeft = 57,
193 kKeyCodeAltRight = 58,
194 kKeyCodeShiftLeft = 59,
195 kKeyCodeShiftRight = 60,
199 kKeyCodeExplorer = 64,
200 kKeyCodeEnvelope = 65,
201 kKeyCodeNewline = 66,
206 kKeyCodeLeftBracket = 71,
207 kKeyCodeRightBracket = 72,
208 kKeyCodeBackslash = 73,
209 kKeyCodeSemicolon = 74,
210 kKeyCodeApostrophe = 75,
214 kKeyCodeHeadSetHook = 79,
218 kKeyCodeNotification = 83,
220 kKeyCodePlayPause = 85,
222 kKeyCodeNextSong = 87,
223 kKeyCodePreviousSong = 88,
225 kKeyCodeForward = 90,
228 kKeyCodePageDown = 93,
229 kKeyCodeVolumeMute = 94,
234 static const KeycodeLabel FLAGS[] = {
235 { "WAKE", 0x00000001 },
236 { "WAKE_DROPPED", 0x00000002 },
237 { "SHIFT", 0x00000004 },
238 { "CAPS_LOCK", 0x00000008 },
239 { "ALT", 0x00000010 },
240 { "ALT_GR", 0x00000020 },
241 { "MENU", 0x00000040 },
242 { "LAUNCHER", 0x00000080 },
246 #endif // _UI_KEYCODE_LABELS_H