Cheatography
https://cheatography.com
codes to key events that can be injected to an android device using adb shell
QWERTY Keyboad keys
Key Name |
Value |
Description |
KEYCODE_0 |
7 (0x07) |
0 |
KEYCODE_1 |
8 (0x08) |
1 |
KEYCODE_2 |
9 (0x09) |
2 |
KEYCODE_3 |
10 (0x0A) |
3 |
KEYCODE_4 |
11 (0x0B) |
4 |
KEYCODE_5 |
12 (0x0C) |
5 |
KEYCODE_6 |
13 (0x0D) |
6 |
KEYCODE_7 |
14 (0x0E) |
7 |
KEYCODE_8 |
15 (0x0F) |
8 |
KEYCODE_9 |
16 (0x10) |
9 |
KEYCODE_STAR |
17 (0x11) |
* |
KEYCODE_POUND |
18 (0x12) |
# |
KEYCODE_A |
29 (0x1D) |
A |
KEYCODE_B |
30 (0x1E) |
B |
KEYCODE_C |
31 (0x1F) |
C |
KEYCODE_D |
32 (0x20) |
D |
KEYCODE_E |
33 (0x21) |
E |
KEYCODE_F |
34 (0x22) |
F |
KEYCODE_G |
35 (0x23) |
G |
KEYCODE_H |
36 (0x24) |
H |
KEYCODE_I |
37 (0x25) |
I |
KEYCODE_J |
38 (0x26) |
J |
KEYCODE_K |
39 (0x27) |
K |
KEYCODE_L |
40 (0x28) |
L |
KEYCODE_M |
41 (0x29) |
M |
KEYCODE_N |
42 (0x2A) |
N |
KEYCODE_O |
43 (0x2B) |
O |
KEYCODE_P |
44 (0x2C) |
P |
KEYCODE_Q |
45 (0x2D) |
Q |
KEYCODE_R |
46 (0x2E) |
R |
KEYCODE_S |
47 (0x2F) |
S |
KEYCODE_T |
48 (0x30) |
T |
KEYCODE_U |
49 (0x31) |
U |
KEYCODE_V |
50 (0x32) |
V |
KEYCODE_W |
51 (0x33) |
W |
KEYCODE_X |
52 (0x34) |
X |
KEYCODE_Y |
53 (0x35) |
Y |
KEYCODE_Z |
54 (0x36) |
Z |
KEYCODE_COMMA |
55 (0x37) |
, (comma) |
KEYCODE_PERIOD |
56 (0x38) |
. (Period) |
KEYCODE_ALT_LEFT |
57 (0x39) |
Left Alt modifier key |
KEYCODE_ALT_RIGHT |
58 (0x3A) |
Right Alt modifier key |
KEYCODE_SHIFT_LEFT |
59 (0x3B) |
Left Shift modifier key |
KEYCODE_SHIFT_RIGHT |
60 (0x3C) |
Right Shift modifier key |
KEYCODE_TAB |
61 (0x3D) |
Horizontal Tab |
KEYCODE_SPACE |
62 (0x3E) |
Space |
KEYCODE_ENTER |
66 (0x42) |
Enter |
KEYCODE_DEL |
67 (0x43) |
Backspace |
KEYCODE_GRAVE |
68 (0x44) |
` (Backtick) |
KEYCODE_MINUS |
69 (0x45) |
- (Minus) |
KEYCODE_EQUALS |
70 (0x46) |
= (Equals) |
KEYCODE_LEFT_BRACKET |
71 (0x47) |
[ |
KEYCODE_RIGHT_BRACKET |
72 (0x48) |
] |
KEYCODE_BACKSLASH |
73 (0x49) |
\ (Back slash) |
KEYCODE_SEMICOLON |
74 (0x4A) |
; (Semicolon) |
KEYCODE_APOSTROPHE |
75 (0x4B) |
'' (apostrophe) |
KEYCODE_SLASH |
76 (0x4C) |
/ (Forward slash) |
KEYCODE_AT |
77 (0x4D) |
@ |
KEYCODE_PLUS |
81 (0x51) |
+ (Plus) |
KEYCODE_FORWARD_DEL |
112 (0x70) |
Delete |
|
|
Physical Buttons
KEYCODE_SOFT_RIGHT |
2 (0x02) |
Soft Right key |
KEYCODE_HOME |
3 (0x03) |
Home key |
KEYCODE_CALL |
5 (0x05) |
Call key |
KEYCODE_ENDCALL |
6 (0x06) |
End Call key |
KEYCODE_VOLUME_UP |
24 (0x18) |
Volume Up |
KEYCODE_VOLUME_DOWN |
25 (0x19) |
Volume Down |
KEYCODE_POWER |
26 (0x1A) |
Power key |
KEYCODE_CAMERA |
27 (0x1B) |
Camera key |
KEYCODE_CLEAR |
28 (0x1C) |
Clear key |
These are the physical buttons on the device
Media keys
KEYCODE_MEDIA_PLAY_PAUSE |
085 (0x55) |
Play/Pause media |
KEYCODE_MEDIA_STOP |
086 (0x56) |
Stop media |
KEYCODE_MEDIA_NEXT |
087 (0x57) |
Play Next media |
KEYCODE_MEDIA_PREVIOUS |
088 (0x58) |
Play Previous media |
KEYCODE_MEDIA_REWIND |
089 (0x59) |
Rewind media |
KEYCODE_MEDIA_FAST_FORWARD |
090 (0x5a) |
Fast Forward media |
KEYCODE_MUTE |
091 (0x5b) |
Mutes the microphone |
KEYCODE_MEDIA_PLAY |
126 (0x7e) |
Play media |
KEYCODE_MEDIA_PAUSE |
127 (0x7f) |
Pause media |
KEYCODE_MEDIA_CLOSE |
128 (0x80) |
Close media (CD) |
KEYCODE_MEDIA_EJECT |
129 (0x81) |
Eject media (CD) |
KEYCODE_MEDIA_RECORD |
130 (0x82) |
Record media |
KEYCODE_MEDIA_SKIP_FORWARD |
272 (0x0110) |
Skip forward media |
KEYCODE_MEDIA_SKIP_BACKWARD |
273 (0x0111) |
Skip backward media |
KEYCODE_MEDIA_STEP_FORWARD |
274 (0x0112) |
Step forward media |
KEYCODE_MEDIA_STEP_BACKWARD |
275 (0x0113) |
Step backward media |
Game Controller Keys
KEYCODE_BUTTON_A |
96 (0x60) |
Button-A |
KEYCODE_BUTTON_B |
97 (0x61) |
Button-B |
KEYCODE_BUTTON_C |
98 (0x62) |
Button-C |
KEYCODE_BUTTON_X |
99 (0x63) |
Button-X |
KEYCODE_BUTTON_Y |
100 (0x64) |
Button-Y |
KEYCODE_BUTTON_Z |
101 (0x65) |
Button-Z |
KEYCODE_BUTTON_L1 |
102 (0x66) |
Top Left Trigger Button-1 |
KEYCODE_BUTTON_R1 |
103 (0x67) |
Top Right Trigger Button-1 |
KEYCODE_BUTTON_L2 |
104 (0x68) |
Top Left Trigger Button-2 |
KEYCODE_BUTTON_R2 |
105 (0x69) |
Top Right Trigger Button-2 |
KEYCODE_BUTTON_THUMBL |
106 (0x6a) |
Left Thumb Button |
KEYCODE_BUTTON_THUMBR |
107 (0x6b) |
Right Thumb Button |
KEYCODE_BUTTON_START |
108 (0x6c) |
Start Button |
KEYCODE_BUTTON_SELECT |
109 (0x6d) |
Select Button |
KEYCODE_BUTTON_MODE |
110 (0x6e) |
Mode Button |
Number Pad Keys
KEYCODE_NUM |
78 (0x4e) |
Used to enter numeric symbols. |
KEYCODE_NUM_LOCK |
143 (0x8f) |
Num Lock key. |
KEYCODE_NUMPAD_0 |
144 (0x90) |
Numeric keypad '0' key. |
KEYCODE_NUMPAD_1 |
145 (0x91) |
Numeric keypad '1' key. |
KEYCODE_NUMPAD_2 |
146 (0x92) |
Numeric keypad '2' key. |
KEYCODE_NUMPAD_3 |
147 (0x93) |
Numeric keypad '3' key. |
KEYCODE_NUMPAD_4 |
148 (0x94) |
Numeric keypad '4' key. |
KEYCODE_NUMPAD_5 |
149 (0x95) |
Numeric keypad '5' key. |
KEYCODE_NUMPAD_6 |
150 (0x96) |
Numeric keypad '6' key. |
KEYCODE_NUMPAD_7 |
151 (0x97) |
Numeric keypad '7' key. |
KEYCODE_NUMPAD_8 |
152 (0x98) |
Numeric keypad '8' key. |
KEYCODE_NUMPAD_9 |
153 (0x99) |
Numeric keypad '9' key. |
KEYCODE_NUMPAD_DIVIDE |
154 (0x9a) |
Numeric keypad '/' key. |
KEYCODE_NUMPAD_MULTIPLY |
155 (0x9b) |
Numeric keypad '*' key. |
KEYCODE_NUMPAD_SUBTRACT |
156 (0x9c) |
Numeric keypad '-' key. |
KEYCODE_NUMPAD_ADD |
157 (0x9d) |
Numeric keypad '+' key. |
KEYCODE_NUMPAD_DOT |
158 (0x9e) |
Numeric keypad '.' key. |
KEYCODE_NUMPAD_COMMA |
159 (0x9f) |
Numeric keypad ',' key. |
KEYCODE_NUMPAD_ENTER |
160 (0xa0) |
Numeric keypad Enter key. |
KEYCODE_NUMPAD_EQUALS |
161 (0xa1) |
Numeric keypad '=' key. |
KEYCODE_NUMPAD_LEFT_PAREN |
162 (0xa2) |
Numeric keypad '(' key. |
KEYCODE_NUMPAD_RIGHT_PAREN |
163 (0xa3) |
Numeric keypad ')' key. |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets