在使用逃逸工具测试输入事件时,我无法获得鼠标移动事件。
我只收到三个鼠标事件:
left click event: type = EV_KEY, code = 272 (LeftBtn), value=1/0
right click event: type = EV_KEY, code = 273 (RightBtn), value = 1/0
mouse wheel event: type = EV_REL, code = 8 (Wheel), value = -1没有鼠标移动事件。那么,我的鼠标移动事件在哪里,以及如何捕捉它?
ps:在VirtualBox-4中的Ubuntu 11.04和Gentoo上进行测试,安装了virtualBox。
发布于 2011-12-16 00:49:36
如果不是在嵌入式linux系统上,我更喜欢使用输入-utils工具,而不是evtest (如果我在Android上,则使用cat /proc/bus/input/devices和getevent )。
通过以下方式安装输入-实用程序:
$ sudo apt-get install input-utils列出我所有的输入设备
$ sudo lsinput
/dev/input/event0
bustype : BUS_HOST
vendor : 0x0
product : 0x5
version : 0
name : "Lid Switch"
..
..
phys : "isa0060/serio1/input0"
bits ev : EV_SYN EV_KEY EV_ABS
/dev/input/event12
bustype : BUS_I8042
vendor : 0x2
product : 0xa
version : 0
name : "TPPS/2 IBM TrackPoint"
phys : "synaptics-pt/serio0/input0"
bits ev : EV_SYN EV_KEY EV_REL然后,我在笔记本电脑的跟踪点上读取事件(不要忘记在启动输入事件后将其移动)。
$ sudo input-events 12
/dev/input/event12
bustype : BUS_I8042
vendor : 0x2
product : 0xa
version : 0
name : "TPPS/2 IBM TrackPoint"
phys : "synaptics-pt/serio0/input0"
bits ev : EV_SYN EV_KEY EV_REL
waiting for events
16:43:46.516075: EV_REL REL_Y -1
16:43:46.516090: EV_SYN code=0 value=0
16:43:46.539642: EV_REL REL_X -1
16:43:46.539656: EV_REL REL_Y -1
16:43:46.539660: EV_SYN code=0 value=0
16:43:46.704385: EV_REL REL_Y -1
16:43:46.704401: EV_SYN code=0 value=0发布于 2011-06-10 15:16:06
你试过移动鼠标而不是逃避吗?当我移动鼠标但在/dev/input/by-path/platform-i8042-serio-1-event-mouse.上做的时候,我没有在/dev/ but /event*上得到任何东西。当我使用/dev/input/by-path/platform-i8042-serio-1-event-mouse并将鼠标移动到Synergy时,我也没有得到任何东西,我必须物理地移动鼠标。
萨奇
https://stackoverflow.com/questions/5949631
复制相似问题