Logitech Marble 滑鼠 - Linux 滾動修改器設置

Logitech Marble 滑鼠 - Linux 滾動修改器設置

在 Linux 中,如何設定 Logitech Marble 滑鼠,以便將「後退」按鈕變更為滾動修改器? IE:按住「後退」按鈕,現在軌跡球控制滾動。

答案1

我正在使用 Arch 衍生品(Antergos),這個配置源自於他們的大理石滑鼠維基頁面

將以下內容新增至/usr/share/X11/xorg.conf.d/40-libinput.conf文件...

# Section added for scroll with Marble Mouse
Section "InputClass"
    Identifier      "Marble Mouse"
    MatchProduct    "Logitech USB Trackball"
    Driver          "libinput"
    Option          "ButtonMapping" "1 2 3 4 5 6 7 0 9"
    Option          "ScrollMethod" "button"
    Option          "ScrollButton" "8"
    Option          "MiddleEmulation" "on"
EndSection

請注意,後退按鈕操作已停用,因為它在嘗試滾動時偶爾會觸發。

答案2

您也可以使用evdev驅動程式。為此,將以下內容新增至新的/usr/share/X11/xorg.conf.d/50-marble-mouse.conf

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "ButtonMapping" "1 2 3 4 5 6 7 8 9"
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"
        Option "ZAxisMapping" "4 5"
        Option  "XAxisMapping" "6 7"
        Option  "Emulate3Buttons" "true"
EndSection

上述配置適用於 Ubuntu 18.04,但不適用於在 ThinkPad R60 上執行的 Xubuntu 18.04。對於後者,我必須使用libinputPeter 上面發布的配置。

答案3

我使用以下配置(類似於@PeterL,但不停用後退按鈕)

/etc/X11/xorg.conf.d/10-libinput.conf

“輸入類別”部分
     標識符“大理石滑鼠”
     搭配產品“羅技 USB 軌跡球”
     驅動程式“libinput”
     選項“滾動方法”“按鈕”
     選項“滾動按鈕”“8”
     選項“加速速度”“1”
     # 選項“變換矩陣”“2.4 0 0 0 2.4 0 0 0 1”
結束部分

註釋的 TransformationMatrix 允許跳過像素並移動得更快,但我更喜歡更改 DPI,如下所示。

  • 透過 /etc/udev/hwdb.d/71-mouse-local.hwdb 設定自訂 DPI
# 羅技大理石滑鼠
#id 取得方式: mouse-dpi-tool /dev/input/event4
滑鼠:usb:v046dpc408:名稱:羅技 USB 軌跡球:
# 下面保留空間
 滑鼠DPI=100@125

然後udevadm hwdb --updateudevadm control --reload-rules && udevadm trigger拔掉滑鼠,再插上滑鼠。 DPI 100 對於某些人來說可能太敏感,您可以替換為 200@125。

相關內容