evdev 事件未显示在 libinput 或 X11 中

evdev 事件未显示在 libinput 或 X11 中

一些背景:我使用的是 VEIKK A50 绘图板,带有自定义补丁版本这位司机添加按钮支持。平板电脑在插入时会注册 3 个 evdev 设备 - 笔事件通过其中一个进行,按钮事件通过第二个进行,我假设第三个用于手势板,我还没有开始工作。

使用以下方法可以很好地检测按钮事件evtest

$ evtest /dev/input/event7
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x2feb product 0x3 version 0x100
Input device name: "VEIKK A50 Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 256 (BTN_0)
    Event code 257 (BTN_1)
    Event code 258 (BTN_2)
    Event code 259 (BTN_3)
    Event code 260 (BTN_4)
    Event code 261 (BTN_5)
    Event code 262 (BTN_6)
    Event code 263 (BTN_7)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
    Event code 332 (BTN_STYLUS2)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max    32768
      Resolution       1
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max    32768
      Resolution       1
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max     8192
Properties:
  Property type 0 (INPUT_PROP_POINTER)
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1593877860.725627, type 1 (EV_KEY), code 256 (BTN_0), value 1
Event: time 1593877860.725627, -------------- SYN_REPORT ------------
Event: time 1593877860.821631, type 1 (EV_KEY), code 256 (BTN_0), value 0
Event: time 1593877860.821631, -------------- SYN_REPORT ------------
Event: time 1593877861.053666, type 1 (EV_KEY), code 257 (BTN_1), value 1
Event: time 1593877861.053666, -------------- SYN_REPORT ------------
Event: time 1593877861.133790, type 1 (EV_KEY), code 257 (BTN_1), value 0
Event: time 1593877861.133790, -------------- SYN_REPORT ------------
Event: time 1593877861.477718, type 1 (EV_KEY), code 258 (BTN_2), value 1
Event: time 1593877861.477718, -------------- SYN_REPORT ------------
Event: time 1593877861.549708, type 1 (EV_KEY), code 258 (BTN_2), value 0
Event: time 1593877861.549708, -------------- SYN_REPORT ------------
Event: time 1593877861.918267, type 1 (EV_KEY), code 259 (BTN_3), value 1
Event: time 1593877861.918267, -------------- SYN_REPORT ------------
Event: time 1593877861.990011, type 1 (EV_KEY), code 259 (BTN_3), value 0
Event: time 1593877861.990011, -------------- SYN_REPORT ------------
Event: time 1593877862.766219, type 1 (EV_KEY), code 260 (BTN_4), value 1
Event: time 1593877862.766219, -------------- SYN_REPORT ------------
Event: time 1593877862.885867, type 1 (EV_KEY), code 260 (BTN_4), value 0
Event: time 1593877862.885867, -------------- SYN_REPORT ------------
Event: time 1593877863.301937, type 1 (EV_KEY), code 261 (BTN_5), value 1
Event: time 1593877863.301937, -------------- SYN_REPORT ------------
Event: time 1593877863.397949, type 1 (EV_KEY), code 261 (BTN_5), value 0
Event: time 1593877863.397949, -------------- SYN_REPORT ------------
Event: time 1593877864.694091, type 1 (EV_KEY), code 262 (BTN_6), value 1
Event: time 1593877864.694091, -------------- SYN_REPORT ------------
Event: time 1593877864.830257, type 1 (EV_KEY), code 262 (BTN_6), value 0
Event: time 1593877864.830257, -------------- SYN_REPORT ------------
Event: time 1593877865.182508, type 1 (EV_KEY), code 263 (BTN_7), value 1
Event: time 1593877865.182508, -------------- SYN_REPORT ------------
Event: time 1593877865.278161, type 1 (EV_KEY), code 263 (BTN_7), value 0
Event: time 1593877865.278161, -------------- SYN_REPORT ------------

但是,使用libinput debug-events或时xev,按下任何按钮都不会发生任何情况。我添加了一个自定义 X11 配置文件,以强制平板电脑直接通过 evdev,而不是通过 libinput,xev尽管如此,却什么也没检测到。

我还尝试更改驱动程序代码中的按钮,让它们输出已知的工作事件,例如 BTN_STYLUS(/dev/input/event6按下两个手写笔按钮之一时发送)或 KEY_A。 libinput 或 xev 都没有检测到这些。

相关内容