用命令行发送键盘,touch消息
来源:互联网 发布:js判断是否为空对象 编辑:程序博客网 时间:2024/06/06 09:14
use: sendevent command format: sendevent device type code value
[command] [device] [type] [code] [value]
sendevent
/dev/input/event0 1 229 1
/dev/input/event0 is the device to send it to
[type] 1 is unknow for me ( maybe code for physical button on device )
[code] 229 is the MENU button of the emulator
[value] 1 is keydown or press down ( for keyup or up use 0 )
i wrote a batch file for sending the event to the device like below:
adb -s emulator-5554 shell sendevent
/dev/input/event0 1 229 1
adb -s emulator-5554 shell sendevent /dev/input/event0 1 229 0
have to use the follow command to simulate a pressing of button ( aka pressing down then let go )
Key Name CODE
MENU 229
HOME 102
BACK (back button) 158
CALL (call button) 231
END (end call button) 107
now keyboard shown on the emulator
Key Name CODE
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
0 11
q 16
w 17
e 18
r 19
t 20
y 21
u 22
i 23
o 24
p 25
a 30
s 31
d 32
f 33
g 34
h 35
j 36
k 37 l 38
DEL (delete key) 14
SHIFT (shift key) 42
z 44
x 45
c 46
v 47
b 48
n 49
m 50 . (period) 52 return (enter key) 28
Lt Alt (Left ALT key) 56 SYM 127 @ 215 Spc (Space key) 57 / 53
- 用命令行发送键盘,touch消息
- 用命令行发送键盘,touch消息
- 用命令发送邮件
- 教你用命令行的方式发送Email
- 巧用命令行
- 用命令行关闭端口
- 用命令行加载驱动
- 用命令行关闭端口
- 用命令行运行单元测试
- 用命令行卸载 DB2
- 用命令行管理SVN
- 用命令行管理s3
- 用命令行开关UAC
- 用命令行操作mongodb
- 用命令行创建Profile
- texturepacker 用命令行批处理
- APK用命令行签名
- 用命令行安装VHSM
- 如何重定向域控制器的活动目录数据库
- 小虎队
- Delphi版 关于QQ输入控件无法Spy到句柄的实现方案可行性研究
- 第一次使用ADO.NET
- java 代码生成数字证书
- 用命令行发送键盘,touch消息
- EXISTS、IN、NOT EXISTS、NOT IN的区别
- 对路径“……”的访问被拒绝
- hdu acm 2033
- AIX+ORACLE10g RAC ORA-04030 问题解决过程
- Symbian S60第三版手机最基本常见问题及解决方案
- 常见设计模式的解析和实现(C++)---Adapt模式
- 在GridView中使用CSS固定上、左表头(似Excel冻结行列一样)(限IE)(含操作视频)
- SSH+MySQL开发中的中文乱码问题