无法从 /dev/input/event* 获取 Wacom 事件

发布于 2024-08-13 23:58:57 字数 568 浏览 4 评论 0原文

我创建了一个 pygtk 程序来监视任何应用程序的键盘状态和鼠标点击(即不仅仅是我的应用程序)。它使用 Micah Dowty 的 evdev,它基本上监视 /dev/input/event* 的输出,并以我可以向用户显示信息的方式解码信息。

该程序非常适合 USB 键盘和鼠标,但不适用于 USB Wacom(也不是串行 Wacom),即使以 root 身份运行也是如此。我在使用 Wacom 时没有收到来自任何 /dev/input/* 节点的任何事件。不仅仅是我的 Wacom,还有来自播客“Meet the Gimp”(Rolf 和 Philippe)的人也没有得到任何东西。

代码位于 http://code.google.com/p/key-mon

要进行测试,您可以运行类似的命令:

sudo ./evdev.py /dev/input/event0 

例如,当您移动鼠标或单击键盘时,您应该会看到与 event0 连接的任何内容都会出现事件。

I have created a pygtk program to monitor the keyboard status and mouse clicks across any application (i.e. not just for my application). This uses evdev by Micah Dowty which basically monitors /dev/input/event* for output and decodes the information in a way that I can display the information to the user.

The program works perfectly for USB keyboards and mice, but doesn't work for a USB Wacom (nor serial Wacom), even when running as root. I don't get any events for coming out of any of the /dev/input/* nodes for the Wacom as use it. It's not just my Wacom, but also they guys from the podcast "Meet the Gimp" (Rolf and Philippe) don't get anything as well.

The code lives at http://code.google.com/p/key-mon.

To test, you can run something like:

sudo ./evdev.py /dev/input/event0 

You should see events coming out for whatever is connected to event0 as you move the mouse or click the keyboard, for example.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

腹黑女流氓 2024-08-20 23:58:57

这是由于 X 完全控制了您的输入设备,您无法自己读取事件。您可能会遇到以下两个问题之一:

  1. “包罗万象”实际上正在获取您的设备。
    在 /var/log/Xorg.0.log 中,您应该看到类似以下的行:

    Stantum MTP USB 控制器:应用输入类“evdev touchscreen catchall”

    当然是针对 wacom 的。如果是这样,您可以通过编辑 /usr/share/X11/xorg.conf.d/10-evdev.conf 来禁用“触摸屏”包罗万象,并删除谈论触摸屏的部分。

  2. 也许您适合 Wacom 部分,因此请编辑 /usr/share/X11/xorg.conf.d/50-wacom.conf,并删除可以匹配您的相应部分设备。

当然,这两个问题都没有得到彻底解决,并且您不能让 X 和内核事件同时工作。 (我从未找到 Wacom 的解决方案,如果有人有,请分享!)

This is due to X that take the full control of your input device, you can't read event yourself. You might have one of theses 2 issues :

  1. A "catchall" is actually getting your device.
    In your /var/log/Xorg.0.log, you should see a line like :

    Stantum MTP USB Controller: Applying InputClass "evdev touchscreen catchall"

    But for wacom of course. If it's true, you can disable the "touchscreen" catchall by editing your /usr/share/X11/xorg.conf.d/10-evdev.conf, and remove the section that talking about touchscreen.

  2. Maybe you'll fit in the Wacom section, so edit the /usr/share/X11/xorg.conf.d/50-wacom.conf, and remove appropriate section that can match your device.

Of course, both of the issue is not resolved in a clean manner, and you can't have X and Kernel event working at the same time. (I never found a solution with Wacom, if anybody have, please share !)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文