禁用 Logitech 轨迹球的“返回”

lam*_*nxy 11 xorg input-devices logitech

我有一个带有四个按钮的 Logitech Marble Mouse 轨迹球:

在此处输入图片说明

使用这里说明,我已经50-marblemouse.conf设置了(xorg.conf) 以便按住“后退”按钮让我滚动:

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"
EndSection
Run Code Online (Sandbox Code Playgroud)

但是,有时“保持”会注册为单击“返回”,这在我浏览网页时非常烦人。 有什么办法可以使用按钮滚动但禁用单击吗?

通常的解决方法似乎是使用“前进”按钮进行滚动,因为点击它几乎是无害的,但我发现用无名指点击它比拇指后退按钮更尴尬。

小智 3

我认为您正在寻找的选项是 ButtonMapping。我的鼠标也有类似的烦人功能(https://www.kensington.com/en/no/4493/k72327eu/slimblade-trackball),所以不久前就发现了这一点。

\n\n

即使您禁用按钮或重新分配映射,“EmulateWheelButton”选项仍然应该起作用......

\n\n

现在,我仅使用 evdev 上的 xinput 对此进行了测试。使用 xinput 尝试要快得多,然后您只需将脚本添加到“启动应用程序”中,而不必修改 /etc/X11/ 并一遍又一遍地重新启动 X。

\n\n

因此,这应该是您在 xorg.d/mouse.conf 中需要的全部内容(如果您不想使用登录脚本为每个用户执行此操作,则注释掉的行是应该需要的),尽管您可能不需要这个如果你使用 xinput 的话:

\n\n
Section "InputDevice"\n    Identifier  "Configured Mouse"\n    Driver    "evdev"\n    Option    "Device"                "/dev/input/mice"\n    Option    "Protocol"              "auto"\n    #Option    "EmulateWheel"          "1"\n    #Option    "EmulateWheelButton"    "8"\n    #Option    "ButtonMapping"        "1 2 3 4 5 6 7 0 9 10 11 12"\nEndSection\n
Run Code Online (Sandbox Code Playgroud)\n\n

这是我为找出解决方案所做的事情(显然,在以下命令中将我的设备替换为您的设备):

\n\n

显示设备:

\n\n
$ xinput list\nVirtual core pointer                        id=2    [master pointer  (3)]\n  \xe2\x86\xb3 Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]\n  \xe2\x86\xb3 ELAN Touchscreen                            id=11   [slave  pointer  (2)]\n  \xe2\x86\xb3 SynPS/2 Synaptics TouchPad                  id=13   [slave  pointer  (2)]\n  \xe2\x86\xb3 Kensington Kensington Slimblade Trackball   id=18   [slave  pointer  (2)]\n
Run Code Online (Sandbox Code Playgroud)\n\n

查看该设备支持哪些属性:

\n\n
$ xinput list-props "Kensington Kensington Slimblade Trackball"\nDevice \'Kensington Kensington Slimblade Trackball\':\n    Device Enabled (142):        1\n    Coordinate Transformation Matrix (144):        1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000\n    Device Accel Profile (273):        0\n    Device Accel Constant Deceleration (274):        1.000000\n    Device Accel Adaptive Deceleration (275):        1.000000\n    Device Accel Velocity Scaling (276):        10.000000\n    Device Product ID (260):        1149, 8257\n    Device Node (261):        "/dev/input/event17"\n    Evdev Axis Inversion (277):        0, 0\n    Evdev Axes Swap (279):        0\n    Axis Labels (280):        "Rel X" (152), "Rel Y" (153), "Rel Vert Wheel" (573)\n    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)\n    Evdev Scrolling Distance (282):        1, 1, 1\n    Evdev Middle Button Emulation (283):        0\n    Evdev Middle Button Timeout (284):        50\n    Evdev Third Button Emulation (285):        0\n    Evdev Third Button Emulation Timeout (286):        1000\n    Evdev Third Button Emulation Button (287):        3\n    Evdev Third Button Emulation Threshold (288):        20\n    Evdev Wheel Emulation (289):        1\n    Evdev Wheel Emulation Axes (290):        0, 0, 4, 5\n    Evdev Wheel Emulation Inertia (291):        10\n    Evdev Wheel Emulation Timeout (292):        200\n    Evdev Wheel Emulation Button (293):        8\n    Evdev Drag Lock Buttons (294):        0\n
Run Code Online (Sandbox Code Playgroud)\n\n

现在让我们尝试一下:

\n\n
$ xinput set-button-map "Kensington Kensington Slimblade Trackball" 1 2 3 4 5 6 7 0 9 10 11 12\n$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation" 1\n$ xinput set-prop "Kensington Kensington Slimblade Trackball" "Evdev Wheel Emulation Button" 8\n
Run Code Online (Sandbox Code Playgroud)\n\n

现在我的右上角按钮只能用作自动滚动,而不是令人恼火的后退行为!

\n