虚拟输入设备不工作

虚拟输入设备不工作

我已经使用 uinput 创建了一个虚拟键盘

我可以看到输入设备/sys/devices/virtual/input

作为input7

按键操作似乎没有被记录。

据我所知,它没有出现在xinput -list

更新

查看input7目录中/sys/devices/virtual/input我可以看到一个目录event4

按照evtest@dirkt 的建议,我可以看到我的键盘事件已成功生成。

Event: time 1624187132.489135, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1624187132.489135, -------------- SYN_REPORT ------------
Event: time 1624187134.489502, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1624187134.489502, -------------- SYN_REPORT ------------
Event: time 1624187134.681998, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1624187134.681998, -------------- SYN_REPORT ------------
Event: time 1624187136.682230, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1624187136.682230, -------------- SYN_REPORT ------------
Event: time 1624187136.682537, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1624187136.682537, -------------- SYN_REPORT ------------
Event: time 1624187138.683337, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1624187138.683337, -------------- SYN_REPORT ------------
Event: time 1624187138.683697, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1624187138.683697, -------------- SYN_REPORT ------------
Event: time 1624187140.684101, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1624187140.684101, -------------- SYN_REPORT ------------
Event: time 1624187144.894104, type 1 (EV_KEY), code 45 (KEY_X), value 1
Event: time 1624187144.894104, -------------- SYN_REPORT ------------
Event: time 1624187146.895425, type 1 (EV_KEY), code 45 (KEY_X), value 0
Event: time 1624187146.895425, -------------- SYN_REPORT ------------

现在我认为我需要将其添加到我的 xorg 配置中,以便 xfce 可以接收事件。

相关内容