ADB shell input keyevent code explanation

Source: Internet
Author: User
Tags delete key modifier


adb shell input keyevent 7    # for key ‘0‘
adb shell input keyevent 8    # for key ‘1‘
adb shell input keyevent 29    # for key ‘A‘
adb shell input keyevent 54    # for key ‘B‘
adb shell input text "ANDROID" 
---------------------------------------------------
Phone Key Name Description key value
Keycode_call Dialing keys 5
Keycode_endcall Hanging machine Key 6
Keycode_home Button Home 3
Keycode_menu Menu key 82
Keycode_back Return key 4
Keycode_search Search Key 84
Keycode_camera Photo Key 27
Keycode_focus Taking pictures of Zoom 80
Keycode_power Power key 26
Keycode_notification Notification key 83
Keycode_mute Microphone Mute Key 91
Keycode_volume_mute Speaker Mute Key 164
Keycode_volume_up Volume Increase key 24
Keycode_volume_down Volume Decrease key 25
Control Key Name Description key value
Keycode_enter Enter 66
Keycode_escape ESC key 111
Keycode_dpad_center Navigation key OK key 23
Keycode_dpad_up Navigation key Up 19
Keycode_dpad_down Navigation key Down 20
Keycode_dpad_left Navigation key left 21st
Keycode_dpad_right Navigation keys to the right 22
Keycode_move_home Cursor moves to the Start key 122
Keycode_move_end Cursor moves to the END key 123
Keycode_page_up Page UP key 92
Keycode_page_down Page DOWN key 93
Keycode_del Backspace key 67
Keycode_forward_del Delete key 112
Keycode_insert Insert key 124
Keycode_tab TAB key 61
Keycode_num_lock Keypad lock 143
Keycode_caps_lock Caps LOCK key 115
Keycode_break Break/pause Key 121
Keycode_scroll_lock Scroll LOCK key 116
Keycode_zoom_in Magnification key 168
Keycode_zoom_out Zoom Out Key 169
Combination Key Name Description
Keycode_alt_left Alt+left
Keycode_alt_right Alt+right
Keycode_ctrl_left Control+left
Keycode_ctrl_right Control+right
Keycode_shift_left Shift+left
Keycode_shift_right Shift+right
Basic Key Name Description key value
Keycode_0 Key ' 0 ' 7
Keycode_1 Key ' 1 ' 8
Keycode_2 Key ' 2 ' 9
Keycode_3 Key ' 3 ' 10
Keycode_4 Key ' 4 ' 11
Keycode_5 Key ' 5 ' 12
Keycode_6 Key ' 6 ' 13
Keycode_7 Key ' 7 ' 14
Keycode_8 Key ' 8 ' 15
Keycode_9 Key ' 9 ' 16
Keycode_a Key ' A ' 29
Keycode_b Key ' B ' 30
Keycode_c Key ' C ' 31
Keycode_d Key ' D ' 32
Keycode_e Key ' E ' 33
Keycode_f Key ' F ' 34
Keycode_g Key ' G ' 35
Keycode_h Key ' H ' 36
Keycode_i Key ' I ' 37
Keycode_j Key ' J ' 38
Keycode_k Key ' K ' 39
Keycode_l Key ' L ' 40
Keycode_m Key ' M ' 41
Keycode_n Press ' N ' 42
Keycode_o Key ' O ' 43
Keycode_p Key ' P ' 44
Keycode_q Key ' Q ' 45
Keycode_r Key ' R ' 46
keycode_s Press ' S ' 47
keycode_t Button ' T ' 48
Keycode_u Press ' U ' 49
Keycode_v Press ' V ' 50
Keycode_w Press the key ' W ' 51
Keycode_x Key ' X ' 52
Keycode_y Press ' Y ' 53
Keycode_z Key ' Z ' 54
Symbol Key Name Description
Keycode_plus Press ' + '
Keycode_minus Button '-'
Keycode_star Button ' * '
Keycode_slash Button '/'
Keycode_equals Key ' = '
Keycode_at Press the key ' @ '
Keycode_pound Key ' # '
Keycode_apostrophe Key "(single quote)
Keycode_backslash Button ' \ '
Keycode_comma Button ', '
Keycode_period Press the button '. '
Keycode_left_bracket Button ' ['
Keycode_right_bracket Button '] '
Keycode_semicolon Button '; '
Keycode_grave Button ""
Keycode_space Space key
Keypad Key Name Description
Keycode_numpad_0 Keypad key ' 0 '
Keycode_numpad_1 Keypad key ' 1 '
Keycode_numpad_2 Keypad key ' 2 '
Keycode_numpad_3 Keypad key ' 3 '
Keycode_numpad_4 Keypad key ' 4 '
Keycode_numpad_5 Keypad key ' 5 '
Keycode_numpad_6 Keypad key ' 6 '
Keycode_numpad_7 Keypad key ' 7 '
Keycode_numpad_8 Keypad key ' 8 '
Keycode_numpad_9 Keypad key ' 9 '
Keycode_numpad_add keypad Keys ' + '
Keycode_numpad_subtract keypad Keys '-'
Keycode_numpad_multiply keypad Keys ' * '
Keycode_numpad_divide keypad Keys '/'
Keycode_numpad_equals Keypad key ' = '
Keycode_numpad_comma keypad Keys ', '
Keycode_numpad_dot Keypad key '. '
Keycode_numpad_left_paren keypad Keys ' ('
Keycode_numpad_right_paren Keypad key ') '
Keycode_numpad_enter keypad keys Enter
Function Key Name Description
Keycode_f1 Key F1
Keycode_f2 Key F2
Keycode_f3 Key F3
Keycode_f4 Key F4
Keycode_f5 Key F5
Keycode_f6 Key F6
Keycode_f7 Key F7
Keycode_f8 Key F8
Keycode_f9 Key F9
Keycode_f10 Key F10
Keycode_f11 Key F11
Keycode_f12 Key F12
Multimedia Key Name Description
Keycode_media_play Multimedia key Playback
Keycode_media_stop Multimedia Key Stop
Keycode_media_pause Multimedia Key Pause
Keycode_media_play_pause Multimedia key play/Pause
Keycode_media_fast_forward Multimedia Key Fast Forward
Keycode_media_rewind Multimedia Key Fast Rewind
Keycode_media_next Multimedia key Next
Keycode_media_previous Multimedia key on a song
Keycode_media_close Multimedia key off
Keycode_media_eject Multimedia Key Popup
Keycode_media_record Multimedia Key Recording
Handle Key Name Description
Keycode_button_1 Universal GamePad Button #1
Keycode_button_2 Universal GamePad Button #2
Keycode_button_3 Universal GamePad Button #3
Keycode_button_4 Universal GamePad Button #4
Keycode_button_5 Universal GamePad Button #5
Keycode_button_6 Universal GamePad Button #6
Keycode_button_7 Universal GamePad Button #7
Keycode_button_8 Universal GamePad Button #8
Keycode_button_9 Universal GamePad Button #9
Keycode_button_10 Universal GamePad Button #10
Keycode_button_11 Universal GamePad Button #11
Keycode_button_12 Universal GamePad Button #12
Keycode_button_13 Universal GamePad Button #13
Keycode_button_14 Universal GamePad Button #14
Keycode_button_15 Universal GamePad Button #15
Keycode_button_16 Universal GamePad Button #16
Keycode_button_a Game Handle Button A
Keycode_button_b Game Handle Button B
Keycode_button_c Game Handle Button C
Keycode_button_x Game Handle Button X
Keycode_button_y Game Handle Button Y
Keycode_button_z Game Handle Button Z
Keycode_button_l1 Game Handle Button L1
Keycode_button_l2 Game Handle Button L2
Keycode_button_r1 Game Handle Button R1
Keycode_button_r2 Game Handle Button R2
Keycode_button_mode Game Handle Button Mode
Keycode_button_select Game Handle Button Select
Keycode_button_start Game Handle Button Start
Keycode_button_thumbl Left Thumb Button
Keycode_button_thumbr Right Thumb Button
Unknown origin




Key Name Description
Keycode_num Key number modifier
Keycode_info Key Info
Keycode_app_switch Button App Switch
Keycode_bookmark Key Bookmark
Keycode_avr_input Key A/V Receiver input
Keycode_avr_power Button A/V Receiver power
Keycode_captions Key Toggle Captions
Keycode_channel_down Key channel down
Keycode_channel_up Key channel up
Keycode_clear Button Clear
Keycode_dvr Key DVR
Keycode_envelope Key Envelope Special function
Keycode_explorer Key Explorer Special function
Keycode_forward Key forward
Keycode_forward_del Key forward Delete
Keycode_function Key function modifier
Keycode_guide Key Guide
Keycode_headsethook Button Headset Hook
Keycode_meta_left Press the left Meta modifier
Keycode_meta_right button right Meta modifier
Keycode_pictsymbols Button picture Symbols modifier
Keycode_prog_blue Key Blue "Programmable"
Keycode_prog_green Button Green "programmable"
Keycode_prog_red Key Red "programmable"
Keycode_prog_yellow Key yellow "programmable"
Keycode_settings Key settings
Keycode_soft_left Press Soft left
Keycode_soft_right Button Soft Right
Keycode_stb_input Key Set-top-box Input
Keycode_stb_power Key Set-top-box Power
Keycode_switch_charset Button Switch Charset modifier
Keycode_sym Key symbol modifier
Keycode_sysrq Button System Request/print screen
Keycode_tv Key TV
Keycode_tv_input Key TV Input
Keycode_tv_power Key TV Power
Keycode_window Key window
Keycode_unknown Unknown key
Supported KeyCode
0 -->  "KEYCODE_UNKNOWN"
1 -->  "KEYCODE_MENU"
2 -->  "KEYCODE_SOFT_RIGHT"
3 -->  "KEYCODE_HOME"
4 -->  "KEYCODE_BACK"
5 -->  "KEYCODE_CALL" 
6 -->  "KEYCODE_ENDCALL" 
7 -->  "KEYCODE_0" 
8 -->  "KEYCODE_1" 
9 -->  "KEYCODE_2" 
10 -->  "KEYCODE_3"
11 -->  "KEYCODE_4" 
12 -->  "KEYCODE_5" 
13 -->  "KEYCODE_6" 
14 -->  "KEYCODE_7" 
15 -->  "KEYCODE_8" 
16 -->  "KEYCODE_9" 
17 -->  "KEYCODE_STAR" 
18 -->  "KEYCODE_POUND" 
19 -->  "KEYCODE_DPAD_UP" 
20 -->  "KEYCODE_DPAD_DOWN" 
21 -->  "KEYCODE_DPAD_LEFT" 
22 -->  "KEYCODE_DPAD_RIGHT"
23 -->  "KEYCODE_DPAD_CENTER" 
24 -->  "KEYCODE_VOLUME_UP" 
25 -->  "KEYCODE_VOLUME_DOWN" 
26 -->  "KEYCODE_POWER" 
27 -->  "KEYCODE_CAMERA" 
28 -->  "KEYCODE_CLEAR" 
29 -->  "KEYCODE_A" 
30 -->  "KEYCODE_B" 
31 -->  "KEYCODE_C" 
32 -->  "KEYCODE_D" 
33 -->  "KEYCODE_E" 
34 -->  "KEYCODE_F" 
35 -->  "KEYCODE_G" 
36 -->  "KEYCODE_H" 
37 -->  "KEYCODE_I" 
38 -->  "KEYCODE_J" 
39 -->  "KEYCODE_K" 
40 -->  "KEYCODE_L" 
41 -->  "KEYCODE_M"
42 -->  "KEYCODE_N" 
43 -->  "KEYCODE_O" 
44 -->  "KEYCODE_P" 
45 -->  "KEYCODE_Q" 
46 -->  "KEYCODE_R" 
47 -->  "KEYCODE_S" 
48 -->  "KEYCODE_T" 
49 -->  "KEYCODE_U" 
50 -->  "KEYCODE_V" 
51 -->  "KEYCODE_W" 
52 -->  "KEYCODE_X"
53 -->  "KEYCODE_Y" 
54 -->  "KEYCODE_Z" 
55 -->  "KEYCODE_COMMA" 
56 -->  "KEYCODE_PERIOD"
57 -->  "KEYCODE_ALT_LEFT" 
58 -->  "KEYCODE_ALT_RIGHT" 
59 -->  "KEYCODE_SHIFT_LEFT" 
60 -->  "KEYCODE_SHIFT_RIGHT" 
61 -->  "KEYCODE_TAB" 
62 -->  "KEYCODE_SPACE" 
63 -->  "KEYCODE_SYM" 
64 -->  "KEYCODE_EXPLORER" 
65 -->  "KEYCODE_ENVELOPE" 
66 -->  "KEYCODE_ENTER" 
67 -->  "KEYCODE_DEL" 
68 -->  "KEYCODE_GRAVE" 
69 -->  "KEYCODE_MINUS" 
70 -->  "KEYCODE_EQUALS" 
71 -->  "KEYCODE_LEFT_BRACKET" 
72 -->  "KEYCODE_RIGHT_BRACKET" 
73 -->  "KEYCODE_BACKSLASH" 
74 -->  "KEYCODE_SEMICOLON" 
75 -->  "KEYCODE_APOSTROPHE"
76 -->  "KEYCODE_SLASH" 
77 -->  "KEYCODE_AT" 
78 -->  "KEYCODE_NUM" 
79 -->  "KEYCODE_HEADSETHOOK" 
80 -->  "KEYCODE_FOCUS"
81 -->  "KEYCODE_PLUS"
82 -->  "KEYCODE_MENU"
83 -->  "KEYCODE_NOTIFICATION"
84 -->  "KEYCODE_SEARCH" 
85 -->  "TAG_LAST_KEYCODE" 
----------------


ADB shell input keyevent code explanation


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.