查看当前机器支持adb shell input 的命令
如下可以查询

  1. C:\Users\Administrator>adb shell
  2. root@android:/ # input
  3. input
  4. usage: input ...
  5. input text <string>
  6. input keyevent <key code number or name>
  7. input [touchscreen|touchpad] tap <x> <y>
  8. input [touchscreen|touchpad] swipe <x1> <y1> <x2> <y2>
  9. input trackball press
  10. input trackball roll <dx> <dy>
复制

1、模拟输入文本信息 adb shell inout text

2、模拟物理按键操作 adb shell input keyevent

3.模拟点击操作 adb shell input tap

4.模拟滑动操作 adb shell input swipe

5.模拟轨迹球操作 adb shell input roll

但开发中主要使用也就2个而已

比如:

1、模拟Back键

adb shell input keyevent 4

2、模拟点击处于(100,100)位置的地方

adb shell input tap 100 100

PS:扩展知识

以下是KeyEvent.java中定义的KEYCODE对应的值

  1. public static final int KEYCODE_UNKNOWN = 0;
  2. /** Key code constant: Soft Left key.
  3. * Usually situated below the display on phones and used as a multi-function
  4. * feature key for selecting a software defined function shown on the bottom left
  5. * of the display. */
  6. public static final int KEYCODE_SOFT_LEFT = 1;
  7. /** Key code constant: Soft Right key.
  8. * Usually situated below the display on phones and used as a multi-function
  9. * feature key for selecting a software defined function shown on the bottom right
  10. * of the display. */
  11. public static final int KEYCODE_SOFT_RIGHT = 2;
  12. /** Key code constant: Home key.
  13. * This key is handled by the framework and is never delivered to applications. */
  14. public static final int KEYCODE_HOME = 3;
  15. /** Key code constant: Back key. */
  16. public static final int KEYCODE_BACK = 4;
  17. /** Key code constant: Call key. */
  18. public static final int KEYCODE_CALL = 5;
  19. /** Key code constant: End Call key. */
  20. public static final int KEYCODE_ENDCALL = 6;
  21. /** Key code constant: '0' key. */
  22. public static final int KEYCODE_0 = 7;
  23. /** Key code constant: '1' key. */
  24. public static final int KEYCODE_1 = 8;
  25. /** Key code constant: '2' key. */
  26. public static final int KEYCODE_2 = 9;
  27. /** Key code constant: '3' key. */
  28. public static final int KEYCODE_3 = 10;
  29. /** Key code constant: '4' key. */
  30. public static final int KEYCODE_4 = 11;
  31. /** Key code constant: '5' key. */
  32. public static final int KEYCODE_5 = 12;
  33. /** Key code constant: '6' key. */
  34. public static final int KEYCODE_6 = 13;
  35. /** Key code constant: '7' key. */
  36. public static final int KEYCODE_7 = 14;
  37. /** Key code constant: '8' key. */
  38. public static final int KEYCODE_8 = 15;
  39. /** Key code constant: '9' key. */
  40. public static final int KEYCODE_9 = 16;
  41. /** Key code constant: '*' key. */
  42. public static final int KEYCODE_STAR = 17;
  43. /** Key code constant: '#' key. */
  44. public static final int KEYCODE_POUND = 18;
  45. /** Key code constant: Directional Pad Up key.
  46. * May also be synthesized from trackball motions. */
  47. public static final int KEYCODE_DPAD_UP = 19;
  48. /** Key code constant: Directional Pad Down key.
  49. * May also be synthesized from trackball motions. */
  50. public static final int KEYCODE_DPAD_DOWN = 20;
  51. /** Key code constant: Directional Pad Left key.
  52. * May also be synthesized from trackball motions. */
  53. public static final int KEYCODE_DPAD_LEFT = 21;
  54. /** Key code constant: Directional Pad Right key.
  55. * May also be synthesized from trackball motions. */
  56. public static final int KEYCODE_DPAD_RIGHT = 22;
  57. /** Key code constant: Directional Pad Center key.
  58. * May also be synthesized from trackball motions. */
  59. public static final int KEYCODE_DPAD_CENTER = 23;
  60. /** Key code constant: Volume Up key.
  61. * Adjusts the speaker volume up. */
  62. public static final int KEYCODE_VOLUME_UP = 24;
  63. /** Key code constant: Volume Down key.
  64. * Adjusts the speaker volume down. */
  65. public static final int KEYCODE_VOLUME_DOWN = 25;
  66. /** Key code constant: Power key. */
  67. public static final int KEYCODE_POWER = 26;
  68. /** Key code constant: Camera key.
  69. * Used to launch a camera application or take pictures. */
  70. public static final int KEYCODE_CAMERA = 27;
  71. /** Key code constant: Clear key. */
  72. public static final int KEYCODE_CLEAR = 28;
  73. /** Key code constant: 'A' key. */
  74. public static final int KEYCODE_A = 29;
  75. /** Key code constant: 'B' key. */
  76. public static final int KEYCODE_B = 30;
  77. /** Key code constant: 'C' key. */
  78. public static final int KEYCODE_C = 31;
  79. /** Key code constant: 'D' key. */
  80. public static final int KEYCODE_D = 32;
  81. /** Key code constant: 'E' key. */
  82. public static final int KEYCODE_E = 33;
  83. /** Key code constant: 'F' key. */
  84. public static final int KEYCODE_F = 34;
  85. /** Key code constant: 'G' key. */
  86. public static final int KEYCODE_G = 35;
  87. /** Key code constant: 'H' key. */
  88. public static final int KEYCODE_H = 36;
  89. /** Key code constant: 'I' key. */
  90. public static final int KEYCODE_I = 37;
  91. /** Key code constant: 'J' key. */
  92. public static final int KEYCODE_J = 38;
  93. /** Key code constant: 'K' key. */
  94. public static final int KEYCODE_K = 39;
  95. /** Key code constant: 'L' key. */
  96. public static final int KEYCODE_L = 40;
  97. /** Key code constant: 'M' key. */
  98. public static final int KEYCODE_M = 41;
  99. /** Key code constant: 'N' key. */
  100. public static final int KEYCODE_N = 42;
  101. /** Key code constant: 'O' key. */
  102. public static final int KEYCODE_O = 43;
  103. /** Key code constant: 'P' key. */
  104. public static final int KEYCODE_P = 44;
  105. /** Key code constant: 'Q' key. */
  106. public static final int KEYCODE_Q = 45;
  107. /** Key code constant: 'R' key. */
  108. public static final int KEYCODE_R = 46;
  109. /** Key code constant: 'S' key. */
  110. public static final int KEYCODE_S = 47;
  111. /** Key code constant: 'T' key. */
  112. public static final int KEYCODE_T = 48;
  113. /** Key code constant: 'U' key. */
  114. public static final int KEYCODE_U = 49;
  115. /** Key code constant: 'V' key. */
  116. public static final int KEYCODE_V = 50;
  117. /** Key code constant: 'W' key. */
  118. public static final int KEYCODE_W = 51;
  119. /** Key code constant: 'X' key. */
  120. public static final int KEYCODE_X = 52;
  121. /** Key code constant: 'Y' key. */
  122. public static final int KEYCODE_Y = 53;
  123. /** Key code constant: 'Z' key. */
  124. public static final int KEYCODE_Z = 54;
  125. /** Key code constant: ',' key. */
  126. public static final int KEYCODE_COMMA = 55;
  127. /** Key code constant: '.' key. */
  128. public static final int KEYCODE_PERIOD = 56;
  129. /** Key code constant: Left Alt modifier key. */
  130. public static final int KEYCODE_ALT_LEFT = 57;
  131. /** Key code constant: Right Alt modifier key. */
  132. public static final int KEYCODE_ALT_RIGHT = 58;
  133. /** Key code constant: Left Shift modifier key. */
  134. public static final int KEYCODE_SHIFT_LEFT = 59;
  135. /** Key code constant: Right Shift modifier key. */
  136. public static final int KEYCODE_SHIFT_RIGHT = 60;
  137. /** Key code constant: Tab key. */
  138. public static final int KEYCODE_TAB = 61;
  139. /** Key code constant: Space key. */
  140. public static final int KEYCODE_SPACE = 62;
  141. /** Key code constant: Symbol modifier key.
  142. * Used to enter alternate symbols. */
  143. public static final int KEYCODE_SYM = 63;
  144. /** Key code constant: Explorer special function key.
  145. * Used to launch a browser application. */
  146. public static final int KEYCODE_EXPLORER = 64;
  147. /** Key code constant: Envelope special function key.
  148. * Used to launch a mail application. */
  149. public static final int KEYCODE_ENVELOPE = 65;
  150. /** Key code constant: Enter key. */
  151. public static final int KEYCODE_ENTER = 66;
  152. /** Key code constant: Backspace key.
  153. * Deletes characters before the insertion point, unlike {@link #KEYCODE_FORWARD_DEL}. */
  154. public static final int KEYCODE_DEL = 67;
  155. /** Key code constant: '`' (backtick) key. */
  156. public static final int KEYCODE_GRAVE = 68;
  157. /** Key code constant: '-'. */
  158. public static final int KEYCODE_MINUS = 69;
  159. /** Key code constant: '=' key. */
  160. public static final int KEYCODE_EQUALS = 70;
  161. /** Key code constant: '[' key. */
  162. public static final int KEYCODE_LEFT_BRACKET = 71;
  163. /** Key code constant: ']' key. */
  164. public static final int KEYCODE_RIGHT_BRACKET = 72;
  165. /** Key code constant: '\' key. */
  166. public static final int KEYCODE_BACKSLASH = 73;
  167. /** Key code constant: ';' key. */
  168. public static final int KEYCODE_SEMICOLON = 74;
  169. /** Key code constant: ''' (apostrophe) key. */
  170. public static final int KEYCODE_APOSTROPHE = 75;
  171. /** Key code constant: '/' key. */
  172. public static final int KEYCODE_SLASH = 76;
  173. /** Key code constant: '@' key. */
  174. public static final int KEYCODE_AT = 77;
  175. /** Key code constant: Number modifier key.
  176. * Used to enter numeric symbols.
  177. * This key is not Num Lock; it is more like {@link #KEYCODE_ALT_LEFT} and is
  178. * interpreted as an ALT key by {@link android.text.method.MetaKeyKeyListener}. */
  179. public static final int KEYCODE_NUM = 78;
  180. /** Key code constant: Headset Hook key.
  181. * Used to hang up calls and stop media. */
  182. public static final int KEYCODE_HEADSETHOOK = 79;
  183. /** Key code constant: Camera Focus key.
  184. * Used to focus the camera. */
  185. public static final int KEYCODE_FOCUS = 80; // *Camera* focus
  186. /** Key code constant: '+' key. */
  187. public static final int KEYCODE_PLUS = 81;
  188. /** Key code constant: Menu key. */
  189. public static final int KEYCODE_MENU = 82;
  190. /** Key code constant: Notification key. */
  191. public static final int KEYCODE_NOTIFICATION = 83;
  192. /** Key code constant: Search key. */
  193. public static final int KEYCODE_SEARCH = 84;
  194. /** Key code constant: Play/Pause media key. */
  195. public static final int KEYCODE_MEDIA_PLAY_PAUSE= 85;
  196. /** Key code constant: Stop media key. */
  197. public static final int KEYCODE_MEDIA_STOP = 86;
  198. /** Key code constant: Play Next media key. */
  199. public static final int KEYCODE_MEDIA_NEXT = 87;
  200. /** Key code constant: Play Previous media key. */
  201. public static final int KEYCODE_MEDIA_PREVIOUS = 88;
  202. /** Key code constant: Rewind media key. */
  203. public static final int KEYCODE_MEDIA_REWIND = 89;
  204. /** Key code constant: Fast Forward media key. */
  205. public static final int KEYCODE_MEDIA_FAST_FORWARD = 90;
  206. /** Key code constant: Mute key.
  207. * Mutes the microphone, unlike {@link #KEYCODE_VOLUME_MUTE}. */
  208. public static final int KEYCODE_MUTE = 91;
  209. /** Key code constant: Page Up key. */
  210. public static final int KEYCODE_PAGE_UP = 92;
  211. /** Key code constant: Page Down key. */
  212. public static final int KEYCODE_PAGE_DOWN = 93;
  213. /** Key code constant: Picture Symbols modifier key.
  214. * Used to switch symbol sets (Emoji, Kao-moji). */
  215. public static final int KEYCODE_PICTSYMBOLS = 94; // switch symbol-sets (Emoji,Kao-moji)
  216. /** Key code constant: Switch Charset modifier key.
  217. * Used to switch character sets (Kanji, Katakana). */
  218. public static final int KEYCODE_SWITCH_CHARSET = 95; // switch char-sets (Kanji,Katakana)
  219. /** Key code constant: A Button key.
  220. * On a game controller, the A button should be either the button labeled A
  221. * or the first button on the bottom row of controller buttons. */
  222. public static final int KEYCODE_BUTTON_A = 96;
  223. /** Key code constant: B Button key.
  224. * On a game controller, the B button should be either the button labeled B
  225. * or the second button on the bottom row of controller buttons. */
  226. public static final int KEYCODE_BUTTON_B = 97;
  227. /** Key code constant: C Button key.
  228. * On a game controller, the C button should be either the button labeled C
  229. * or the third button on the bottom row of controller buttons. */
  230. public static final int KEYCODE_BUTTON_C = 98;
  231. /** Key code constant: X Button key.
  232. * On a game controller, the X button should be either the button labeled X
  233. * or the first button on the upper row of controller buttons. */
  234. public static final int KEYCODE_BUTTON_X = 99;
  235. /** Key code constant: Y Button key.
  236. * On a game controller, the Y button should be either the button labeled Y
  237. * or the second button on the upper row of controller buttons. */
  238. public static final int KEYCODE_BUTTON_Y = 100;
  239. /** Key code constant: Z Button key.
  240. * On a game controller, the Z button should be either the button labeled Z
  241. * or the third button on the upper row of controller buttons. */
  242. public static final int KEYCODE_BUTTON_Z = 101;
  243. /** Key code constant: L1 Button key.
  244. * On a game controller, the L1 button should be either the button labeled L1 (or L)
  245. * or the top left trigger button. */
  246. public static final int KEYCODE_BUTTON_L1 = 102;
  247. /** Key code constant: R1 Button key.
  248. * On a game controller, the R1 button should be either the button labeled R1 (or R)
  249. * or the top right trigger button. */
  250. public static final int KEYCODE_BUTTON_R1 = 103;
  251. /** Key code constant: L2 Button key.
  252. * On a game controller, the L2 button should be either the button labeled L2
  253. * or the bottom left trigger button. */
  254. public static final int KEYCODE_BUTTON_L2 = 104;
  255. /** Key code constant: R2 Button key.
  256. * On a game controller, the R2 button should be either the button labeled R2
  257. * or the bottom right trigger button. */
  258. public static final int KEYCODE_BUTTON_R2 = 105;
  259. /** Key code constant: Left Thumb Button key.
  260. * On a game controller, the left thumb button indicates that the left (or only)
  261. * joystick is pressed. */
  262. public static final int KEYCODE_BUTTON_THUMBL = 106;
  263. /** Key code constant: Right Thumb Button key.
  264. * On a game controller, the right thumb button indicates that the right
  265. * joystick is pressed. */
  266. public static final int KEYCODE_BUTTON_THUMBR = 107;
  267. /** Key code constant: Start Button key.
  268. * On a game controller, the button labeled Start. */
  269. public static final int KEYCODE_BUTTON_START = 108;
  270. /** Key code constant: Select Button key.
  271. * On a game controller, the button labeled Select. */
  272. public static final int KEYCODE_BUTTON_SELECT = 109;
  273. /** Key code constant: Mode Button key.
  274. * On a game controller, the button labeled Mode. */
  275. public static final int KEYCODE_BUTTON_MODE = 110;
  276. /** Key code constant: Escape key. */
  277. public static final int KEYCODE_ESCAPE = 111;
  278. /** Key code constant: Forward Delete key.
  279. * Deletes characters ahead of the insertion point, unlike {@link #KEYCODE_DEL}. */
  280. public static final int KEYCODE_FORWARD_DEL = 112;
  281. /** Key code constant: Left Control modifier key. */
  282. public static final int KEYCODE_CTRL_LEFT = 113;
  283. /** Key code constant: Right Control modifier key. */
  284. public static final int KEYCODE_CTRL_RIGHT = 114;
  285. /** Key code constant: Caps Lock key. */
  286. public static final int KEYCODE_CAPS_LOCK = 115;
  287. /** Key code constant: Scroll Lock key. */
  288. public static final int KEYCODE_SCROLL_LOCK = 116;
  289. /** Key code constant: Left Meta modifier key. */
  290. public static final int KEYCODE_META_LEFT = 117;
  291. /** Key code constant: Right Meta modifier key. */
  292. public static final int KEYCODE_META_RIGHT = 118;
  293. /** Key code constant: Function modifier key. */
  294. public static final int KEYCODE_FUNCTION = 119;
  295. /** Key code constant: System Request / Print Screen key. */
  296. public static final int KEYCODE_SYSRQ = 120;
  297. /** Key code constant: Break / Pause key. */
  298. public static final int KEYCODE_BREAK = 121;
  299. /** Key code constant: Home Movement key.
  300. * Used for scrolling or moving the cursor around to the start of a line
  301. * or to the top of a list. */
  302. public static final int KEYCODE_MOVE_HOME = 122;
  303. /** Key code constant: End Movement key.
  304. * Used for scrolling or moving the cursor around to the end of a line
  305. * or to the bottom of a list. */
  306. public static final int KEYCODE_MOVE_END = 123;
  307. /** Key code constant: Insert key.
  308. * Toggles insert / overwrite edit mode. */
  309. public static final int KEYCODE_INSERT = 124;
  310. /** Key code constant: Forward key.
  311. * Navigates forward in the history stack. Complement of {@link #KEYCODE_BACK}. */
  312. public static final int KEYCODE_FORWARD = 125;
  313. /** Key code constant: Play media key. */
  314. public static final int KEYCODE_MEDIA_PLAY = 126;
  315. /** Key code constant: Pause media key. */
  316. public static final int KEYCODE_MEDIA_PAUSE = 127;
  317. /** Key code constant: Close media key.
  318. * May be used to close a CD tray, for example. */
  319. public static final int KEYCODE_MEDIA_CLOSE = 128;
  320. /** Key code constant: Eject media key.
  321. * May be used to eject a CD tray, for example. */
  322. public static final int KEYCODE_MEDIA_EJECT = 129;
  323. /** Key code constant: Record media key. */
  324. public static final int KEYCODE_MEDIA_RECORD = 130;
  325. /** Key code constant: F1 key. */
  326. public static final int KEYCODE_F1 = 131;
  327. /** Key code constant: F2 key. */
  328. public static final int KEYCODE_F2 = 132;
  329. /** Key code constant: F3 key. */
  330. public static final int KEYCODE_F3 = 133;
  331. /** Key code constant: F4 key. */
  332. public static final int KEYCODE_F4 = 134;
  333. /** Key code constant: F5 key. */
  334. public static final int KEYCODE_F5 = 135;
  335. /** Key code constant: F6 key. */
  336. public static final int KEYCODE_F6 = 136;
  337. /** Key code constant: F7 key. */
  338. public static final int KEYCODE_F7 = 137;
  339. /** Key code constant: F8 key. */
  340. public static final int KEYCODE_F8 = 138;
  341. /** Key code constant: F9 key. */
  342. public static final int KEYCODE_F9 = 139;
  343. /** Key code constant: F10 key. */
  344. public static final int KEYCODE_F10 = 140;
  345. /** Key code constant: F11 key. */
  346. public static final int KEYCODE_F11 = 141;
  347. /** Key code constant: F12 key. */
  348. public static final int KEYCODE_F12 = 142;
  349. /** Key code constant: Num Lock key.
  350. * This is the Num Lock key; it is different from {@link #KEYCODE_NUM}.
  351. * This key alters the behavior of other keys on the numeric keypad. */
  352. public static final int KEYCODE_NUM_LOCK = 143;
  353. /** Key code constant: Numeric keypad '0' key. */
  354. public static final int KEYCODE_NUMPAD_0 = 144;
  355. /** Key code constant: Numeric keypad '1' key. */
  356. public static final int KEYCODE_NUMPAD_1 = 145;
  357. /** Key code constant: Numeric keypad '2' key. */
  358. public static final int KEYCODE_NUMPAD_2 = 146;
  359. /** Key code constant: Numeric keypad '3' key. */
  360. public static final int KEYCODE_NUMPAD_3 = 147;
  361. /** Key code constant: Numeric keypad '4' key. */
  362. public static final int KEYCODE_NUMPAD_4 = 148;
  363. /** Key code constant: Numeric keypad '5' key. */
  364. public static final int KEYCODE_NUMPAD_5 = 149;
  365. /** Key code constant: Numeric keypad '6' key. */
  366. public static final int KEYCODE_NUMPAD_6 = 150;
  367. /** Key code constant: Numeric keypad '7' key. */
  368. public static final int KEYCODE_NUMPAD_7 = 151;
  369. /** Key code constant: Numeric keypad '8' key. */
  370. public static final int KEYCODE_NUMPAD_8 = 152;
  371. /** Key code constant: Numeric keypad '9' key. */
  372. public static final int KEYCODE_NUMPAD_9 = 153;
  373. /** Key code constant: Numeric keypad '/' key (for division). */
  374. public static final int KEYCODE_NUMPAD_DIVIDE = 154;
  375. /** Key code constant: Numeric keypad '*' key (for multiplication). */
  376. public static final int KEYCODE_NUMPAD_MULTIPLY = 155;
  377. /** Key code constant: Numeric keypad '-' key (for subtraction). */
  378. public static final int KEYCODE_NUMPAD_SUBTRACT = 156;
  379. /** Key code constant: Numeric keypad '+' key (for addition). */
  380. public static final int KEYCODE_NUMPAD_ADD = 157;
  381. /** Key code constant: Numeric keypad '.' key (for decimals or digit grouping). */
  382. public static final int KEYCODE_NUMPAD_DOT = 158;
  383. /** Key code constant: Numeric keypad ',' key (for decimals or digit grouping). */
  384. public static final int KEYCODE_NUMPAD_COMMA = 159;
  385. /** Key code constant: Numeric keypad Enter key. */
  386. public static final int KEYCODE_NUMPAD_ENTER = 160;
  387. /** Key code constant: Numeric keypad '=' key. */
  388. public static final int KEYCODE_NUMPAD_EQUALS = 161;
  389. /** Key code constant: Numeric keypad '(' key. */
  390. public static final int KEYCODE_NUMPAD_LEFT_PAREN = 162;
  391. /** Key code constant: Numeric keypad ')' key. */
  392. public static final int KEYCODE_NUMPAD_RIGHT_PAREN = 163;
  393. /** Key code constant: Volume Mute key.
  394. * Mutes the speaker, unlike {@link #KEYCODE_MUTE}.
  395. * This key should normally be implemented as a toggle such that the first press
  396. * mutes the speaker and the second press restores the original volume. */
  397. public static final int KEYCODE_VOLUME_MUTE = 164;
  398. /** Key code constant: Info key.
  399. * Common on TV remotes to show additional information related to what is
  400. * currently being viewed. */
  401. public static final int KEYCODE_INFO = 165;
  402. /** Key code constant: Channel up key.
  403. * On TV remotes, increments the television channel. */
  404. public static final int KEYCODE_CHANNEL_UP = 166;
  405. /** Key code constant: Channel down key.
  406. * On TV remotes, decrements the television channel. */
  407. public static final int KEYCODE_CHANNEL_DOWN = 167;
  408. /** Key code constant: Zoom in key. */
  409. public static final int KEYCODE_ZOOM_IN = 168;
  410. /** Key code constant: Zoom out key. */
  411. public static final int KEYCODE_ZOOM_OUT = 169;
  412. /** Key code constant: TV key.
  413. * On TV remotes, switches to viewing live TV. */
  414. public static final int KEYCODE_TV = 170;
  415. /** Key code constant: Window key.
  416. * On TV remotes, toggles picture-in-picture mode or other windowing functions. */
  417. public static final int KEYCODE_WINDOW = 171;
  418. /** Key code constant: Guide key.
  419. * On TV remotes, shows a programming guide. */
  420. public static final int KEYCODE_GUIDE = 172;
  421. /** Key code constant: DVR key.
  422. * On some TV remotes, switches to a DVR mode for recorded shows. */
  423. public static final int KEYCODE_DVR = 173;
  424. /** Key code constant: Bookmark key.
  425. * On some TV remotes, bookmarks content or web pages. */
  426. public static final int KEYCODE_BOOKMARK = 174;
  427. /** Key code constant: Toggle captions key.
  428. * Switches the mode for closed-captioning text, for example during television shows. */
  429. public static final int KEYCODE_CAPTIONS = 175;
  430. /** Key code constant: Settings key.
  431. * Starts the system settings activity. */
  432. public static final int KEYCODE_SETTINGS = 176;
  433. /** Key code constant: TV power key.
  434. * On TV remotes, toggles the power on a television screen. */
  435. public static final int KEYCODE_TV_POWER = 177;
  436. /** Key code constant: TV input key.
  437. * On TV remotes, switches the input on a television screen. */
  438. public static final int KEYCODE_TV_INPUT = 178;
  439. /** Key code constant: Set-top-box power key.
  440. * On TV remotes, toggles the power on an external Set-top-box. */
  441. public static final int KEYCODE_STB_POWER = 179;
  442. /** Key code constant: Set-top-box input key.
  443. * On TV remotes, switches the input mode on an external Set-top-box. */
  444. public static final int KEYCODE_STB_INPUT = 180;
  445. /** Key code constant: A/V Receiver power key.
  446. * On TV remotes, toggles the power on an external A/V Receiver. */
  447. public static final int KEYCODE_AVR_POWER = 181;
  448. /** Key code constant: A/V Receiver input key.
  449. * On TV remotes, switches the input mode on an external A/V Receiver. */
  450. public static final int KEYCODE_AVR_INPUT = 182;
  451. /** Key code constant: Red "programmable" key.
  452. * On TV remotes, acts as a contextual/programmable key. */
  453. public static final int KEYCODE_PROG_RED = 183;
  454. /** Key code constant: Green "programmable" key.
  455. * On TV remotes, actsas a contextual/programmable key. */
  456. public static final int KEYCODE_PROG_GREEN = 184;
  457. /** Key code constant: Yellow "programmable" key.
  458. * On TV remotes, acts as a contextual/programmable key. */
  459. public static final int KEYCODE_PROG_YELLOW = 185;
  460. /** Key code constant: Blue "programmable" key.
  461. * On TV remotes, acts as a contextual/programmable key. */
  462. public static final int KEYCODE_PROG_BLUE = 186;
  463. /** Key code constant: App switch key.
  464. * Should bring up the application switcher dialog. */
  465. public static final int KEYCODE_APP_SWITCH = 187;
  466. /** Key code constant: Generic Game Pad Button #1.*/
  467. public static final int KEYCODE_BUTTON_1 = 188;
  468. /** Key code constant: Generic Game Pad Button #2.*/
  469. public static final int KEYCODE_BUTTON_2 = 189;
  470. /** Key code constant: Generic Game Pad Button #3.*/
  471. public static final int KEYCODE_BUTTON_3 = 190;
  472. /** Key code constant: Generic Game Pad Button #4.*/
  473. public static final int KEYCODE_BUTTON_4 = 191;
  474. /** Key code constant: Generic Game Pad Button #5.*/
  475. public static final int KEYCODE_BUTTON_5 = 192;
  476. /** Key code constant: Generic Game Pad Button #6.*/
  477. public static final int KEYCODE_BUTTON_6 = 193;
  478. /** Key code constant: Generic Game Pad Button #7.*/
  479. public static final int KEYCODE_BUTTON_7 = 194;
  480. /** Key code constant: Generic Game Pad Button #8.*/
  481. public static final int KEYCODE_BUTTON_8 = 195;
  482. /** Key code constant: Generic Game Pad Button #9.*/
  483. public static final int KEYCODE_BUTTON_9 = 196;
  484. /** Key code constant: Generic Game Pad Button #10.*/
  485. public static final int KEYCODE_BUTTON_10 = 197;
  486. /** Key code constant: Generic Game Pad Button #11.*/
  487. public static final int KEYCODE_BUTTON_11 = 198;
  488. /** Key code constant: Generic Game Pad Button #12.*/
  489. public static final int KEYCODE_BUTTON_12 = 199;
  490. /** Key code constant: Generic Game Pad Button #13.*/
  491. public static final int KEYCODE_BUTTON_13 = 200;
  492. /** Key code constant: Generic Game Pad Button #14.*/
  493. public static final int KEYCODE_BUTTON_14 = 201;
  494. /** Key code constant: Generic Game Pad Button #15.*/
  495. public static final int KEYCODE_BUTTON_15 = 202;
  496. /** Key code constant: Generic Game Pad Button #16.*/
  497. public static final int KEYCODE_BUTTON_16 = 203;
  498. /** Key code constant: Language Switch key.
  499. * Toggles the current input language such as switching between English and Japanese on
  500. * a QWERTY keyboard. On some devices, the same function may be performed by
  501. * pressing Shift+Spacebar. */
  502. public static final int KEYCODE_LANGUAGE_SWITCH = 204;
  503. /** Key code constant: Manner Mode key.
  504. * Toggles silent or vibrate mode on and off to make the device behave more politely
  505. * in certain settings such as on a crowded train. On some devices, the key may only
  506. * operate when long-pressed. */
  507. public static final int KEYCODE_MANNER_MODE = 205;
  508. /** Key code constant: 3D Mode key.
  509. * Toggles the display between 2D and 3D mode. */
  510. public static final int KEYCODE_3D_MODE = 206;
  511. /** Key code constant: Contacts special function key.
  512. * Used to launch an address book application. */
  513. public static final int KEYCODE_CONTACTS = 207;
  514. /** Key code constant: Calendar special function key.
  515. * Used to launch a calendar application. */
  516. public static final int KEYCODE_CALENDAR = 208;
  517. /** Key code constant: Music special function key.
  518. * Used to launch a music player application. */
  519. public static final int KEYCODE_MUSIC = 209;
  520. /** Key code constant: Calculator special function key.
  521. * Used to launch a calculator application. */
  522. public static final int KEYCODE_CALCULATOR = 210;
  523. /** Key code constant: Japanese full-width / half-width key. */
  524. public static final int KEYCODE_ZENKAKU_HANKAKU = 211;
  525. /** Key code constant: Japanese alphanumeric key. */
  526. public static final int KEYCODE_EISU = 212;
  527. /** Key code constant: Japanese non-conversion key. */
  528. public static final int KEYCODE_MUHENKAN = 213;
  529. /** Key code constant: Japanese conversion key. */
  530. public static final int KEYCODE_HENKAN = 214;
  531. /** Key code constant: Japanese katakana / hiragana key. */
  532. public static final int KEYCODE_KATAKANA_HIRAGANA = 215;
  533. /** Key code constant: Japanese Yen key. */
  534. public static final int KEYCODE_YEN = 216;
  535. /** Key code constant: Japanese Ro key. */
  536. public static final int KEYCODE_RO = 217;
  537. /** Key code constant: Japanese kana key. */
  538. public static final int KEYCODE_KANA = 218;
  539. /** Key code constant: Assist key.
  540. * Launches the global assist activity. Not delivered to applications. */
  541. public static final int KEYCODE_ASSIST = 219;
  542. /** Key code constant: Brightness Down key.
  543. * Adjusts the screen brightness down. */
  544. public static final int KEYCODE_BRIGHTNESS_DOWN = 220;
  545. /** Key code constant: Brightness Up key.
  546. * Adjusts the screen brightness up. */
  547. public static final int KEYCODE_BRIGHTNESS_UP = 221;
  548. /** Key code constant: Audio Track key.
  549. * Switches the audio tracks. */
  550. public static final int KEYCODE_MEDIA_AUDIO_TRACK = 222;
  551. /** Key code constant: Sleep key.
  552. * Puts the device to sleep. Behaves somewhat like {@link #KEYCODE_POWER} but it
  553. * has no effect if the device is already asleep. */
  554. public static final int KEYCODE_SLEEP = 223;
  555. /** Key code constant: Wakeup key.
  556. * Wakes up the device. Behaves somewhat like {@link #KEYCODE_POWER} but it
  557. * has no effect if the device is already awake. */
  558. public static final int KEYCODE_WAKEUP = 224;
  559. /** Key code constant: Pairing key.
  560. * Initiates peripheral pairing mode. Useful for pairing remote control
  561. * devices or game controllers, especially if no other input mode is
  562. * available. */
  563. public static final int KEYCODE_PAIRING = 225;
  564. /** Key code constant: Media Top Menu key.
  565. * Goes to the top of media menu. */
  566. public static final int KEYCODE_MEDIA_TOP_MENU = 226;
  567. /** Key code constant: '11' key. */
  568. public static final int KEYCODE_11 = 227;
  569. /** Key code constant: '12' key. */
  570. public static final int KEYCODE_12 = 228;
  571. /** Key code constant: Last Channel key.
  572. * Goes to the last viewed channel. */
  573. public static final int KEYCODE_LAST_CHANNEL = 229;
  574. /** Key code constant: TV data service key.
  575. * Displays data services like weather, sports. */
  576. public static final int KEYCODE_TV_DATA_SERVICE = 230;
  577. /** Key code constant: Voice Assist key.
  578. * Launches the global voice assist activity. Not delivered to applications. */
  579. public static final int KEYCODE_VOICE_ASSIST = 231;
  580. /** Key code constant: Radio key.
  581. * Toggles TV service / Radio service. */
  582. public static final int KEYCODE_TV_RADIO_SERVICE = 232;
  583. /** Key code constant: Teletext key.
  584. * Displays Teletext service. */
  585. public static final int KEYCODE_TV_TELETEXT = 233;
  586. /** Key code constant: Number entry key.
  587. * Initiates to enter multi-digit channel nubmber when each digit key is assigned
  588. * for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC
  589. * User Control Code. */
  590. public static final int KEYCODE_TV_NUMBER_ENTRY = 234;
  591. /** Key code constant: Analog Terrestrial key.
  592. * Switches to analog terrestrial broadcast service. */
  593. public static final int KEYCODE_TV_TERRESTRIAL_ANALOG = 235;
  594. /** Key code constant: Digital Terrestrial key.
  595. * Switches to digital terrestrial broadcast service. */
  596. public static final int KEYCODE_TV_TERRESTRIAL_DIGITAL = 236;
  597. /** Key code constant: Satellite key.
  598. * Switches to digital satellite broadcast service. */
  599. public static final int KEYCODE_TV_SATELLITE = 237;
  600. /** Key code constant: BS key.
  601. * Switches to BS digital satellite broadcasting service available in Japan. */
  602. public static final int KEYCODE_TV_SATELLITE_BS = 238;
  603. /** Key code constant: CS key.
  604. * Switches to CS digital satellite broadcasting service available in Japan. */
  605. public static final int KEYCODE_TV_SATELLITE_CS = 239;
  606. /** Key code constant: BS/CS key.
  607. * Toggles between BS and CS digital satellite services. */
  608. public static final int KEYCODE_TV_SATELLITE_SERVICE = 240;
  609. /** Key code constant: Toggle Network key.
  610. * Toggles selecting broacast services. */
  611. public static final int KEYCODE_TV_NETWORK = 241;
  612. /** Key code constant: Antenna/Cable key.
  613. * Toggles broadcast input source between antenna and cable. */
  614. public static final int KEYCODE_TV_ANTENNA_CABLE = 242;
  615. /** Key code constant: HDMI #1 key.
  616. * Switches to HDMI input #1. */
  617. public static final int KEYCODE_TV_INPUT_HDMI_1 = 243;
  618. /** Key code constant: HDMI #2 key.
  619. * Switches to HDMI input #2. */
  620. public static final int KEYCODE_TV_INPUT_HDMI_2 = 244;
  621. /** Key code constant: HDMI #3 key.
  622. * Switches to HDMI input #3. */
  623. public static final int KEYCODE_TV_INPUT_HDMI_3 = 245;
  624. /** Key code constant: HDMI #4 key.
  625. * Switches to HDMI input #4. */
  626. public static final int KEYCODE_TV_INPUT_HDMI_4 = 246;
  627. /** Key code constant: Composite #1 key.
  628. * Switches to composite video input #1. */
  629. public static final int KEYCODE_TV_INPUT_COMPOSITE_1 = 247;
  630. /** Key code constant: Composite #2 key.
  631. * Switches to composite video input #2. */
  632. public static final int KEYCODE_TV_INPUT_COMPOSITE_2 = 248;
  633. /** Key code constant: Component #1 key.
  634. * Switches to component video input #1. */
  635. public static final int KEYCODE_TV_INPUT_COMPONENT_1 = 249;
  636. /** Key code constant: Component #2 key.
  637. * Switches to component video input #2. */
  638. public static final int KEYCODE_TV_INPUT_COMPONENT_2 = 250;
  639. /** Key code constant: VGA #1 key.
  640. * Switches to VGA (analog RGB) input #1. */
  641. public static final int KEYCODE_TV_INPUT_VGA_1 = 251;
  642. /** Key code constant: Audio description key.
  643. * Toggles audio description off / on. */
  644. public static final int KEYCODE_TV_AUDIO_DESCRIPTION = 252;
  645. /** Key code constant: Audio description mixing volume up key.
  646. * Louden audio description volume as compared with normal audio volume. */
  647. public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253;
  648. /** Key code constant: Audio description mixing volume down key.
  649. * Lessen audio description volume as compared with normal audio volume. */
  650. public static final int KEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254;
  651. /** Key code constant: Zoom mode key.
  652. * Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.) */
  653. public static final int KEYCODE_TV_ZOOM_MODE = 255;
  654. /** Key code constant: Contents menu key.
  655. * Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
  656. * Code */
  657. public static final int KEYCODE_TV_CONTENTS_MENU = 256;
  658. /** Key code constant: Media context menu key.
  659. * Goes to the context menu of media contents. Corresponds to Media Context-sensitive
  660. * Menu (0x11) of CEC User Control Code. */
  661. public static final int KEYCODE_TV_MEDIA_CONTEXT_MENU = 257;
  662. /** Key code constant: Timer programming key.
  663. * Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
  664. * CEC User Control Code. */
  665. public static final int KEYCODE_TV_TIMER_PROGRAMMING = 258;
  666. /** Key code constant: Help key. */
  667. public static final int KEYCODE_HELP = 259;
  668. /** Key code constant: Navigate to previous key.
  669. * Goes backward by one item in an ordered collection of items. */
  670. public static final int KEYCODE_NAVIGATE_PREVIOUS = 260;
  671. /** Key code constant: Navigate to next key.
  672. * Advances to the next item in an ordered collection of items. */
  673. public static final int KEYCODE_NAVIGATE_NEXT = 261;
  674. /** Key code constant: Navigate in key.
  675. * Activates the item that currently has focus or expands to the next level of a navigation
  676. * hierarchy. */
  677. public static final int KEYCODE_NAVIGATE_IN = 262;
  678. /** Key code constant: Navigate out key.
  679. * Backs out one level of a navigation hierarchy or collapses the item that currently has
  680. * focus. */
  681. public static final int KEYCODE_NAVIGATE_OUT = 263;
  682. /** Key code constant: Skip forward media key. */
  683. public static final int KEYCODE_MEDIA_SKIP_FORWARD = 272;
  684. /** Key code constant: Skip backward media key. */
  685. public static final int KEYCODE_MEDIA_SKIP_BACKWARD = 273;
  686. /** Key code constant: Step forward media key.
  687. * Steps media forward, one frame at a time. */
  688. public static final int KEYCODE_MEDIA_STEP_FORWARD = 274;
  689. /** Key code constant: Step backward media key.
  690. * Steps media backward, one frame at a time. */
  691. public static final int KEYCODE_MEDIA_STEP_BACKWARD = 275;
复制

 

相关文章

1 条评论

  • 改变自己
    改变自己 管理员

    KEYCODE_SYSRQ 120 截屏,这个是Android原生的,非常不错,有些系统会拦截。

    回复