fyi
[code]
0 getAction() value: the key has been pressed down
0 Unknown key code
1 getAction() value: the key has been released
1 Soft Left key
Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.
1 This mask is set if the device woke because of this key event
2 getAction() value: multiple duplicate key events have occurred in a row, or a complex string is being delivered
If the key code is not {#link KEYCODE_UNKNOWN then the {#link getRepeatCount() method returns the number of times the given key code should be executed. Otherwise, if the key code is KEYCODE_UNKNOWN, then this is a sequence of characters as returned by getCharacters().
2 Soft Right key
Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.
2 This mask is set if the key event was generated by a software keyboard
3 Home key
This key is handled by the framework and is never delivered to applications.
4 Back key
4 This mask is set if we don't want the key event to cause us to leave touch mode
5 Call key
6 End Call key
7 '0' key
8 '1' key
8 This mask is set if an event was known to come from a trusted part of the system
That is, the event is known to come from the user, and could not have been spoofed by a third party component.
9 '2' key
10 '3' key
11 '4' key
12 '5' key
13 '6' key
14 '7' key
15 '8' key
16 '9' key
16 This mask is used for compatibility, to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done"
This allows TextView to dispatch these as normal enter keys for old applications, but still do the appropriate action when receiving them.
17 '*' key
18 '#' key
19 Directional Pad Up key
May also be synthesized from trackball motions.
20 Directional Pad Down key
May also be synthesized from trackball motions.
21 Directional Pad Left key
May also be synthesized from trackball motions.
22 Directional Pad Right key
May also be synthesized from trackball motions.
23 Directional Pad Center key
May also be synthesized from trackball motions.
24 Volume Up key
Adjusts the speaker volume up.
25 Volume Down key
Adjusts the speaker volume down.
26 Power key
27 Camera key
Used to launch a camera application or take pictures.
28 Clear key
29 'A' key
30 'B' key
31 'C' key
32 'D' key
32 When associated with up key events, this indicates that the key press has been canceled
Typically this is used with virtual touch screen keys, where the user can slide from the virtual key area on to the display: in that case, the application will receive a canceled up event and should not perform the action normally associated with the key. Note that for this to work, the application can not perform an action for a key until it receives an up or the long press timeout has expired.
33 'E' key
34 'F' key
35 'G' key
36 'H' key
37 'I' key
38 'J' key
39 'K' key
40 'L' key
41 'M' key
42 'N' key
43 'O' key
44 'P' key
45 'Q' key
46 'R' key
47 'S' key
48 'T' key
49 'U' key
50 'V' key
51 'W' key
52 'X' key
53 'Y' key
54 'Z' key
55 ',' key
56 '
' key.
57 Left Alt modifier key
58 Right Alt modifier key
59 Left Shift modifier key
60 Right Shift modifier key
61 Tab key
62 Space key
63 Symbol modifier key
Used to enter alternate symbols.
64 Explorer special function key
Used to launch a browser application.
64 This key event was generated by a virtual (on-screen) hard key area
Typically this is an area of the touchscreen, outside of the regular display, dedicated to "hardware" buttons.
65 Envelope special function key
Used to launch a mail application.
66 Enter key
67 Backspace key
Deletes characters before the insertion point, unlike KEYCODE_FORWARD_DEL.
68 '`' (backtick) key
69 '-'
70 '=' key
71 '[' key
72 ']' key
73 '' key
74 ';' key
75 ''' (apostrophe) key
76 '/' key
77 '@' key
78 Number modifier key
Used to enter numeric symbols. This key is not Num Lock; it is more like KEYCODE_ALT_LEFT and is interpreted as an ALT key by MetaKeyKeyListener.
79 Headset Hook key
Used to hang up calls and stop media.
80 Camera Focus key
Used to focus the camera.
81 '+' key
82 Menu key
83 Notification key
84 Search key
85 Play/Pause media key
86 Stop media key
87 Play Next media key
88 Play Previous media key
89 Rewind media key
90 Fast Forward media key
91 Mute key
Mutes the microphone, unlike KEYCODE_VOLUME_MUTE.
92 Page Up key
93 Page Down key
94 Picture Symbols modifier key
Used to switch symbol sets (Emoji, Kao-moji).
95 Switch Charset modifier key
Used to switch character sets (Kanji, Katakana).
96 A Button key
On a game controller, the A button should be either the button labeled A or the first button on the upper row of controller buttons.
97 B Button key
On a game controller, the B button should be either the button labeled B or the second button on the upper row of controller buttons.
98 C Button key
On a game controller, the C button should be either the button labeled C or the third button on the upper row of controller buttons.
99 X Button key
On a game controller, the X button should be either the button labeled X or the first button on the lower row of controller buttons.
100 Y Button key
On a game controller, the Y button should be either the button labeled Y or the second button on the lower row of controller buttons.
101 Z Button key
On a game controller, the Z button should be either the button labeled Z or the third button on the lower row of controller buttons.
102 L1 Button key
On a game controller, the L1 button should be either the button labeled L1 (or L) or the top left trigger button.
103 R1 Button key
On a game controller, the R1 button should be either the button labeled R1 (or R) or the top right trigger button.
104 L2 Button key
On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button.
105 R2 Button key
On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button.
106 Left Thumb Button key
On a game controller, the left thumb button indicates that the left (or only) joystick is pressed.
107 Right Thumb Button key
On a game controller, the right thumb button indicates that the right joystick is pressed.
108 Start Button key
On a game controller, the button labeled Start.
109 Select Button key
On a game controller, the button labeled Select.
110 Mode Button key
On a game controller, the button labeled Mode.
111 Escape key
112 Forward Delete key
Deletes characters ahead of the insertion point, unlike KEYCODE_DEL.
113 Left Control modifier key
114 Right Control modifier key
115 Caps Lock key
116 Scroll Lock key
117 Left Meta modifier key
118 Right Meta modifier key
119 Function modifier key
120 System Request / Print Screen key
121 Break / Pause key
122 Home Movement key
Used for scrolling or moving the cursor around to the start of a line or to the top of a list.
123 End Movement key
Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list.
124 Insert key
Toggles insert / overwrite edit mode.
125 Forward key
Navigates forward in the history stack. Complement of KEYCODE_BACK.
126 Play media key
127 Pause media key
128 Close media key
May be used to close a CD tray, for example.
128 This flag is set for the first key repeat that occurs after the long press timeout
129 Eject media key
May be used to eject a CD tray, for example.
130 Record media key
131 F1 key
132 F2 key
133 F3 key
134 F4 key
135 F5 key
136 F6 key
137 F7 key
138 F8 key
139 F9 key
140 F10 key
141 F11 key
142 F12 key
143 Num Lock key
This is the Num Lock key; it is different from KEYCODE_NUM. This key alters the behavior of other keys on the numeric keypad.
144 Numeric keypad '0' key
145 Numeric keypad '1' key
146 Numeric keypad '2' key
147 Numeric keypad '3' key
148 Numeric keypad '4' key
149 Numeric keypad '5' key
150 Numeric keypad '6' key
151 Numeric keypad '7' key
152 Numeric keypad '8' key
153 Numeric keypad '9' key
154 Numeric keypad '/' key (for division)
155 Numeric keypad '*' key (for multiplication)
156 Numeric keypad '-' key (for subtraction)
157 Numeric keypad '+' key (for addition)
158 Numeric keypad '
' key (for decimals or digit grouping).
159 Numeric keypad ',' key (for decimals or digit grouping)
160 Numeric keypad Enter key
161 Numeric keypad '=' key
162 Numeric keypad '(' key
163 Numeric keypad ')' key
164 Volume Mute key
Mutes the speaker, unlike KEYCODE_MUTE. This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volume.
165 Info key
Common on TV remotes to show additional information related to what is currently being viewed.
166 Channel up key
On TV remotes, increments the television channel.
167 Channel down key
On TV remotes, decrements the television channel.
168 Zoom in key
169 Zoom out key
170 TV key
On TV remotes, switches to viewing live TV.
171 Window key
On TV remotes, toggles picture-in-picture mode or other windowing functions.
172 Guide key
On TV remotes, shows a programming guide.
173 DVR key
On some TV remotes, switches to a DVR mode for recorded shows.
174 Bookmark key
On some TV remotes, bookmarks content or web pages.
175 Toggle captions key
Switches the mode for closed-captioning text, for example during television shows.
176 Settings key
Starts the system settings activity.
177 TV power key
On TV remotes, toggles the power on a television screen.
178 TV input key
On TV remotes, switches the input on a television screen.
179 Set-top-box power key
On TV remotes, toggles the power on an external Set-top-box.
180 Set-top-box input key
On TV remotes, switches the input mode on an external Set-top-box.
181 A/V Receiver power key
On TV remotes, toggles the power on an external A/V Receiver.
182 A/V Receiver input key
On TV remotes, switches the input mode on an external A/V Receiver.
183 Red "programmable" key
On TV remotes, acts as a contextual/programmable key.
184 Green "programmable" key
On TV remotes, actsas a contextual/programmable key.
185 Yellow "programmable" key
On TV remotes, acts as a contextual/programmable key.
186 Blue "programmable" key
On TV remotes, acts as a contextual/programmable key.
187 App switch key
Should bring up the application switcher dialog.
188 Generic Game Pad Button #1
189 Generic Game Pad Button #2
190 Generic Game Pad Button #3
191 Generic Game Pad Button #4
192 Generic Game Pad Button #5
193 Generic Game Pad Button #6
194 Generic Game Pad Button #7
195 Generic Game Pad Button #8
196 Generic Game Pad Button #9
197 Generic Game Pad Button #10
198 Generic Game Pad Button #11
199 Generic Game Pad Button #12
200 Generic Game Pad Button #13
201 Generic Game Pad Button #14
202 Generic Game Pad Button #15
203 Generic Game Pad Button #16
204 Language Switch key
Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard. On some devices, the same function may be performed by pressing Shift+Spacebar.
205 Manner Mode key
Toggles silent or vibrate mode on and off to make the device behave more politely in certain settings such as on a crowded train. On some devices, the key may only operate when long-pressed.
206 3D Mode key
Toggles the display between 2D and 3D mode.
207 Contacts special function key
Used to launch an address book application.
208 Calendar special function key
Used to launch a calendar application.
209 Music special function key
Used to launch a music player application.
210 Calculator special function key
Used to launch a calculator application.
211 Japanese full-width / half-width key
212 Japanese alphanumeric key
213 Japanese non-conversion key
214 Japanese conversion key
215 Japanese katakana / hiragana key
216 Japanese Yen key
217 Japanese Ro key
218 Japanese kana key
219 Assist key
Launches the global assist activity. Not delivered to applications.
256 Set when a key event has FLAG_CANCELED set because a long press action was executed while it was down
512 Set for ACTION_UP when this event's key code is still being tracked from its initial down
That is, somebody requested that tracking started on the key down and a long press has not caused the tracking to be canceled.
1024 Set when a key event has been synthesized to implement default behavior for an event that the application did not handle
Fallback key events are generated by unhandled trackball motions (to emulate a directional keypad) and by certain unhandled key presses that are declared in the key map (such as special function numeric keypad keys when numlock is off).
[/code]
No comments:
Post a Comment