首页 技术 正文
技术 2022年11月17日
0 收藏 901 点赞 2,899 浏览 1373 个字

于qt开发时间。遇到的问题,usb输入设备(鼠标器,usb 电容屏)在动力分配后自己主动input节点,实例usb鼠标停留电后,分配给自己的主动性/dev/input/event0 mouse0。第一插头后,加入自己主动节点在未来。变/dev/input/event1mouse1

对于鼠标类型的设备。/dev/input/mouseX 的全部消息都会汇总到/dev/input/mice,因此,qt的QWS_MOUSE_PROTO输入能够指定IntelliMouse=/dev/input/mice,鼠标插拔即使mouseX变化也都能使用。

可是,对于usb触控类型输入设备,使用的event接口,向应用层汇报的是绝对坐标信息。不是mouse的相对坐标信息,所以当eventX设备号变化后。应用层就无法识别了,由于没有像/dev/input/mice这种接口。而大部分应用触控都使用了tslib。TSLIB_TSDEVICE=/dev/input/event0,

直接给出须要改动的地方:

共同拥有3处:drivers/input/input.c  input_register_device函数

drivers/input/mousedev.c   mousedev_connect函数

drivers/input/evdev.c  evdev_connect函数

结果例如以下,我的三个设备都固定为event6  event7  event8  ,usb设备随意插拔,event handler也不会变化

/ # 

/ # cat /proc/bus/input/devices 

I: Bus=0018 Vendor=0000 Product=0000 Version=0000

N: Name="gt928 Touchscreen"

P: Phys=1-0014/input0

S: Sysfs=/devices/virtual/input/input6

U: Uniq=

H: Handlers=mouse6 event6 

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=1000003

I: Bus=0000 Vendor=0000 Product=0000 Version=0000

N: Name="ADS7846 Touchscreen"

P: Phys=spi1.0/input0

S: Sysfs=/devices/platform/omap2_mcspi.1/spi1.0/input/input7

U: Uniq=

H: Handlers=mouse7 event7 

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=1000003

I: Bus=0003 Vendor=0eef Product=0001 Version=0100

N: Name="eGalax Inc. USB TouchController"

P: Phys=usb-ehci-omap.0-1.1/input0

S: Sysfs=/devices/platform/ehci-omap.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input8

U: Uniq=

H: Handlers=mouse8 event8 

B: EV=b

B: KEY=400 0 0 0 0 0 0 0 0 0 0

B: ABS=1000003

/ #

版权声明:本文博主原创文章,博客,未经同意不得转载。

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,105
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,582
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,429
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,836
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,919