Chinaunix首页 | 论坛 | 博客
  • 博客访问: 9187807
  • 博文数量: 1728
  • 博客积分: 12961
  • 博客等级: 上将
  • 技术积分: 19870
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-09 11:25
个人简介

偷得浮生半桶水(半日闲), 好记性不如抄下来(烂笔头). 信息爆炸的时代, 学习是一项持续的工作.

文章分类

全部博文(1728)

文章存档

2024年(4)

2023年(26)

2022年(112)

2021年(217)

2020年(157)

2019年(192)

2018年(81)

2017年(78)

2016年(70)

2015年(52)

2014年(40)

2013年(51)

2012年(85)

2011年(45)

2010年(231)

2009年(287)

分类: LINUX

2010-04-02 15:07:31

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

****
阅读(2176) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~