我认为您正在寻找的选项是ButtonMapping。我的鼠标也有类似的烦人功能(https://www.kensington.com/en/no/4493/k72327eu/slimblade-trackball),因此前一阵子已经弄清楚了。
即使禁用按钮或重新分配映射,“ EmulateWheelButton”选项仍然应该起作用。
现在,我仅在evdev上使用xinput进行了测试。使用xinput尝试进行操作要快得多,然后您只需将脚本添加到“启动应用程序”中,而不必修改/ etc / X11 /并一遍又一遍地重新启动X。
因此,这应该是xorg.d / mouse.conf中所需的全部内容(注释行是如果您不想使用登录脚本为每个用户执行此操作所需要的行),尽管您可能不需要在如果使用xinput,则全部使用:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "Device" "/dev/input/mice"
Option "Protocol" "auto"
#Option "EmulateWheel" "1"
#Option "EmulateWheelButton" "8"
#Option "ButtonMapping" "1 2 3 4 5 6 7 0 9 10 11 12"
EndSection
这是我为找出解决方案所做的工作(很明显,在以下命令中将设备替换为设备):
显示设备:
$ xinput list
Virtual core pointer id=2 [master pointer (3)]
↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
↳ ELAN Touchscreen id=11 [slave pointer (2)]
↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
↳ Kensington Kensington Slimblade Trackball id=18 [slave pointer (2)]
查看该设备支持哪些属性:
$ xinput list-props "Kensington Kensington Slimblade Trackball"
Device 'Kensington Kensington Slimblade Trackball':
Device Enabled (142): 1
Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (273): 0
Device Accel Constant Deceleration (274): 1.000000
Device Accel Adaptive Deceleration (275): 1.000000
Device Accel Velocity Scaling (276): 10.000000
Device Product ID (260): 1149, 8257
Device Node (261): "/dev/input/event17"
Evdev Axis Inversion (277): 0, 0
Evdev Axes Swap (279): 0
Axis Labels (280): "Rel X" (152), "Rel Y" (153), "Rel Vert Wheel" (573)
Button Labels (281): "Button Left" (145), "Button Middle" (146), "Button Right" (147), "Button Wheel Up" (148), "Button Wheel Down" (149), "Button Horiz Wheel Left" (150), "Button Horiz Wheel Right" (151), "Button Side" (679), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263), "Button Unknown" (263)
Evdev Scrolling Distance (282): 1, 1, 1
Evdev Middle Button Emulation (283): 0
Evdev Middle Button Timeout (284): 50
Evdev Third Button Emulation (285): 0
Evdev Third Button Emulation Timeout (286): 1000
Evdev Third Button Emulation Button (287): 3
Evdev Third Button Emulation Threshold (288): 20
Evdev Wheel Emulation (289): 1
Evdev Wheel Emulation Axes (290): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (291): 10
Evdev Wheel Emulation Timeout (292): 200
Evdev Wheel Emulation Button (293): 8
Evdev Drag Lock Buttons (294): 0
现在让我们试一下:
$ xinput set-button-map "Kensington Kensington Slimblade Trackball" 1 2 3 4 5 6 7 0 9 10 11 12
$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation" 1
$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Button" 8
现在,我的右上角按钮仅作为自动滚动而不是令人反感的行为!