android输入子设备类型
16lz
2021-01-23
判别android输入子设备类型
字符设备:/dev/input/eventX
eventX代表的是所有输入设备(input核心)的事件,比如按键按下,或者鼠标移动,或者游戏遥控器等等。
一、在系统查看的方法是: cat /proc/bus/input/devices
# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0001 Product=0001 Version=0100
N: Name="rk28_AD_button"
P: Phys=rk28_AD_button/input0
S: Sysfs=/devices/platform/rk28_AD_button/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=40008000 1c16c0 0 48000000 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="xpt2046 touchscreen"
P: Phys=spi0.0/input0
S: Sysfs=/devices/platform/rockchip_spi_master/spi0.0/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
例二:
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=100003
B: KEY=20 0 0 40000000 c0040 0 40000000 0
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="Accelerometer"
P: Phys=
S: Sysfs=/devices/virtual/input/input1
U: Uniq=
H: Handlers=event1
B: EV=9
B: ABS=100 7
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="malata_ts"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: EV=9
B: ABS=650000 10000000
二、bit位判别 eventHub.cpp
字符设备:/dev/input/eventX
eventX代表的是所有输入设备(input核心)的事件,比如按键按下,或者鼠标移动,或者游戏遥控器等等。
一、在系统查看的方法是: cat /proc/bus/input/devices
# cat /proc/bus/input/devices
I: Bus=0000 Vendor=0001 Product=0001 Version=0100
N: Name="rk28_AD_button"
P: Phys=rk28_AD_button/input0
S: Sysfs=/devices/platform/rk28_AD_button/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=40008000 1c16c0 0 48000000 0
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="xpt2046 touchscreen"
P: Phys=spi0.0/input0
S: Sysfs=/devices/platform/rockchip_spi_master/spi0.0/input/input1
U: Uniq=
H: Handlers=mouse0 event1
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=3
例二:
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=100003
B: KEY=20 0 0 40000000 c0040 0 40000000 0
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="Accelerometer"
P: Phys=
S: Sysfs=/devices/virtual/input/input1
U: Uniq=
H: Handlers=event1
B: EV=9
B: ABS=100 7
I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="malata_ts"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: EV=9
B: ABS=650000 10000000
二、bit位判别 eventHub.cpp
更多相关文章
- 【Android Developers Training】 10. 序言:支持不同设备
- Android系统移植与调试之------->如何修改Android设备添加重启、
- 获取Android设备的唯一识别码|设备号|序号|UUID
- Android 设备网络信息的获取(网络类型、网络强度、网络速度、代理
- HierarchyView的实现原理和Android设备无法使用HierarchyView的
- 使用QT调用FFMPEG库部署到Android设备、完成视频音频应用开发
- Android-屏幕设备截屏