Skip to main content

Andoird Key codes , adb keyevent


Useful Android Keyevents inputs:

Some time it is extremely useful to send keyevent via adb for automation and other purposes.


#adb shell 

#input

usage: input [text|keyevent]
input text
input keyevent


adb shell
input text "HELLO"

LIST OF KEY CODES: 

1 --> "KEYCODE_MENU"
3 --> "KEYCODE_HOME"
4 --> "KEYCODE_BACK"
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"
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"
66 --> "KEYCODE_ENTER"
67 --> "KEYCODE_DEL"
80 --> "KEYCODE_FOCUS"
82 --> "KEYCODE_MENU"
83 --> "KEYCODE_NOTIFICATION"
84 --> "KEYCODE_SEARCH" 

Enjoy 

Comments

Popular posts from this blog

What is the Current Directory in Windows CE & Windows Mobile ?

Lately i encountered  a situation where i had to find the current directory from where my application is running and all my config files reside. Question is "How do I find the current directory?" on Windows CE/Mobile devices. Desktop / PC it is just piece of cake but Windows CE / Mobile devices don't have a concept of a current directory.  Which means all pats are absolute and there is no concept called relative path. Due to lack of relative paths most of the files are loaded to the "Windows" directory and that is how Windows directory is crowded. Alternatively you can hard code directory path and insist user to load files always there. But i hate to hard code values or copy files to Windows directory.  So this has triggered to find a solution to identify my current directory. Since there is no concept of a current directory on a Windows CE / Windows Mobile device how would one locate a resource for which only a relative path is known?  That is what following c...

Android Bluedroid debugging

Android Bluedroid Debugging  i.e New BT Stack from Android Community: Wow ... its been more than 2 years i updated my blog ... Am i too lazy or too busy or combination of both. Combination of both -:).  Anyways today i see a need to update my blog with some important info regarding Bluedroid debugging. Bluedroid is the latest and greatest Bluetooth stack from Android developed by Google & Broadcom jointly. So obviously Google does not have interest or resources to maintain two stacks hence they are going to drop famous BlueZ stack for good reasons.  BlueZ stack comes with lot of good tools like hcidump for debugging and i see all those tools no more work starting with Android JB MR2 a.k.a 4.3 which has Bluedroid integrated full-fledged.  So Bluedroid got to have new tools or some tools to debug but as usual Google is very poor at documenting the things and they leave finding puzzles to developers out there. SO today's quest is fining the debugging tools ...

Video Tutorial - Programming Languages

As promised earlier that i will try to present some useful information on this blog, Here I present to you my findings on programming language video tutorials . I love C/C++ language and i believe it is mandatory for any enthusiastic programmer to learn C and C++. I found some good introductory video lectures on C++, Java, Perl, and Python. Needles to say i have collected these links from various websites and blog spots. Please post your findings so that others can benefit. Have fun!!!!!!!!!!! C/C++ Related video: ___________________ C++ Programming Tutorial C++ Video Tutorial 1 This video gives a brief introduction to basic commands and you get to make a program that takes 3 numbers that a user inputs and averages them. C++ Video Tutorial 2a C++ Video Tutorial 2b Tutorial going through loops, switch statements, if else statements and applying them to another fairly simple program. C++ Video Tutorial 3 C++ Video Tutorial 4a C++ Video Tutorial 4b Goi...