虚拟鼠标驱动程序,可能存在 X11 问题

虚拟鼠标驱动程序,可能存在 X11 问题

我根据 Essential Linux Device Drivers 一书创建了虚拟鼠标驱动程序。在我将坐标echo x y > /sys/ ... /coordinates写入 sysfs 节点后,我的程序通过事件接口生成事件数据包/dev/input/event5(我检查了这一点)。该事件接口附加到GPM gpm -m /dev/input/event5 -t evdev。但鼠标不动。

也许这会有所帮助:在 Xorg.0.log 中我看到以下内容:

[ 666.521] (II) config/udev: Adding input device (/dev/input/event5)
[ 666.521] (II) No input driver/identifier specified (ignoring)

看起来,代码没问题,但一些外部功能会干扰我的模块工作。

答案1

我花了很多时间来解决这个问题,我想帮助其他遇到这个问题的人。我认为一些外部 X11 功能干扰了我的模块工作。禁用 GDM 后,它现在可以正常工作(运行级别 3)。您可以在这里找到工作代码http://fred-zone.blogspot.ru/2010/01/mouse-linux-kernel-driver.html工作发行版 ubuntu 11.04(gdm 已禁用)

相关内容