如何在 Wayfire/Wayland 中禁用触摸屏右键单击?

如何在 Wayfire/Wayland 中禁用触摸屏右键单击?

我使用运行最新操作系统(例如 Bookworm + Wayfire)的 RPi 5 创建了一个触摸屏信息亭。我正在尝试禁用右键单击事件,因为它们对我的用例来说非常烦人。

如果我触摸 > 拖动 > 按住 > 释放触摸屏,则会生成右键单击操作 - 这些操作通常会意外触发。

如果我使用 或 来查看原始触摸屏事件libinput,则仅evtest不存在离散BTN_RIGHT事件BTN_TOUCH。但是,如果我连接普通鼠标,我就可以看到BTN_RIGHT事件。添加以下文件以/etc/libinput/local-overrides.quirks禁用鼠标右键单击。

[Disable right mouse button on system]
MatchUdevType=mouse
AttrEventCodeDisable=BTN_RIGHT

问题是,在没有离散BTN_RIGHT事件的情况下,如何才能使触摸屏获得相同的结果。据推测这是在某个地方生成(合成)的?

我在 中似乎没有找到任何选项~/.config/wayfire.ini,但我当然愿意接受任何选项(安装 X Windows 除外!)。

原始触摸屏事件:

 $ libinput debug-events /dev/input/event3
 ...
 event3   TOUCH_MOTION            +0.804s   0 (0) 22.50/68.88 (108.00/551.00mm)
 event3   TOUCH_FRAME             +0.804s   
 event3   TOUCH_MOTION            +0.815s   0 (0) 22.08/68.88 (106.00/551.00mm)
 event3   TOUCH_FRAME             +0.815s   
 event3   TOUCH_MOTION            +0.826s   0 (0) 21.88/68.88 (105.00/551.00mm)
 event3   TOUCH_FRAME             +0.826s   
 event3   TOUCH_MOTION            +0.847s   0 (0) 21.67/68.88 (104.00/551.00mm)
 event3   TOUCH_FRAME             +0.847s   
 event3   TOUCH_UP                +0.868s   0 (0)
 event3   TOUCH_FRAME             +0.868s


$ evtest /dev/input/event3
...
Event: time 1705232617.339595, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 108
Event: time 1705232617.339595, type 3 (EV_ABS), code 0 (ABS_X), value 108
Event: time 1705232617.339595, -------------- SYN_REPORT ------------
Event: time 1705232617.350325, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 106
Event: time 1705232617.350325, type 3 (EV_ABS), code 0 (ABS_X), value 106
Event: time 1705232617.350325, -------------- SYN_REPORT ------------
Event: time 1705232617.361048, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 105
Event: time 1705232617.361048, type 3 (EV_ABS), code 0 (ABS_X), value 105
Event: time 1705232617.361048, -------------- SYN_REPORT ------------
Event: time 1705232617.382822, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 104
Event: time 1705232617.382822, type 3 (EV_ABS), code 0 (ABS_X), value 104
Event: time 1705232617.382822, -------------- SYN_REPORT ------------
Event: time 1705232617.403488, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1705232617.403488, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1705232617.403488, -------------- SYN_REPORT ------------

相关内容