我试图编辑我的evdev配置,以模仿鼠标中间的按钮,同时点击鼠标左键和右键。这就是我附加到/etc/X11/xorg.conf.d/10-evdev.conf之后重新启动我的机器的内容。但不起作用。你能看出我做错了什么吗?
Section "InputClass"
Identifier "Logitech Mouse"
MatchProduct "USB-PS/2 Optical Mouse"
MatchVendor "Logitech"
Option "Evdev Middle Button Emulation" "true"
EndSection这是xinput的输出:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB-PS/2 Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ AKKO AKKO 3084BT id=11 [slave pointer (2)]
⎜ ↳ PS/2 Generic Mouse id=14 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AKKO AKKO 3084BT id=10 [slave keyboard (3)]
↳ HP HD Webcam [Fixed] id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ HP Wireless hotkeys id=16 [slave keyboard (3)]
↳ HP WMI hotkeys id=17 [slave keyboard (3)]
↳ ACPI Virtual Keyboard Device id=18 [slave keyboard (3)]发布于 2020-06-27 21:02:18
您通过xorg.conf.d配置它的方法是绝对正确的。我不确定我的解决办法,但也许值得一试:
Identifier "evdev pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"在“输入类”部分中添加/替换上面的代码。(更改标识符,添加其余的) Logitech有时可能有点不同,但我在使用这些参数时遇到了问题。
您的Xorg.log.0是否为您的脚本提供了任何线索?
如果一切都失败,您可以创建一个执行命令的systemd服务:(这不是解决方案,而是解决办法):
[Unit]
Description="Middle mouse emulation
[Service]
Type=simple
ExecStart= xinput set-prop 9 "Evdev Middle Button Emulation" 1
[Install]
WantedBy=multi-user.target启用该服务,它将在下次启动时运行.
发布于 2023-04-03 10:53:17
解决办法:
将下面添加到/etc/X11/xorg.conf.d/10-evdev.conf中
Section "InputClass"
Identifier "middle button emulation class"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Option "Emulate3Buttons" "on"
Driver "evdev"
EndSection来自https://www.spinics.net/linux/fedora/fedora-users/msg472142.html
https://unix.stackexchange.com/questions/595395
复制相似问题