更改 Logitech M570 的滚轮速度

更改 Logitech M570 的滚轮速度

如果我这样做,xinput list-props "Logitech M570"我就会得到

Device 'Logitech M570':
    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
    libinput Natural Scrolling Enabled (277):   0
    libinput Natural Scrolling Enabled Default (278):   0
    libinput Scroll Methods Available (279):    0, 0, 1
    libinput Scroll Method Enabled (280):   0, 0, 10
    libinput Scroll Method Enabled Default (281):   0, 0, 0
    libinput Button Scrolling Button (282): 2
    libinput Button Scrolling Button Default (283): 2
    libinput Middle Emulation Enabled (284):    0
    libinput Middle Emulation Enabled Default (285):    0
    libinput Rotation Angle (286):  0.000000
    libinput Rotation Angle Default (287):  0.000000
    libinput Accel Speed (288): 0.000000
    libinput Accel Speed Default (289): 0.000000
    libinput Accel Profiles Available (290):    1, 1
    libinput Accel Profile Enabled (291):   1, 0
    libinput Accel Profile Enabled Default (292):   1, 0
    libinput Left Handed Enabled (293): 0
    libinput Left Handed Enabled Default (294): 0
    libinput Send Events Modes Available (262): 1, 0
    libinput Send Events Mode Enabled (263):    0, 0
    libinput Send Events Mode Enabled Default (264):    0, 0
    Device Node (265):  "/dev/input/event4"
    Device Product ID (266):    1133, 4136
    libinput Drag Lock Buttons (295):   <no items>
    libinput Horizontal Scroll Enabled (296):   1

我尝试更改一些滚动设置但都出现此错误:

ubuntu@ubuntu-MacBookPro:~$ sudo xinput set-prop "Logitech M570" 'libinput Scroll Methods Available' 0 0 2
X Error of failed request:  BadAccess (attempt to access private resource denied)
ubuntu@ubuntu-MacBookPro:~$ sudo xinput set-prop "Logitech M570" 'libinput Scroll Methods Available' 0 0 1
X Error of failed request:  BadAccess (attempt to access private resource denied)

除了libinput Scroll Method Enabled最初的之外0 0 0,我将其更改为,0 0 10但这对鼠标速度没有任何影响。

答案1

您正在尝试以 root 身份运行它,这可能是导致问题的原因。

您可能想尝试这种方法:

  1. 使用以下方式识别您的设备 xinput list

它应该返回设备列表及其 ID,例如:

 Virtual core pointer                       id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech M705                             id=9    [slave  pointer  (2)]

就我而言,我想要编辑的设备是 Logitech 鼠标,id=9。

  1. 现在你可以继续查询其属性:

xinput list-props 9

这应该产生类似这样的结果:

    libinput Natural Scrolling Enabled (294):   0
    libinput Natural Scrolling Enabled Default (295):   0
    libinput Scroll Methods Available (296):    0, 0, 1
    libinput Scroll Method Enabled (297):   0, 0, 0
    libinput Scroll Method Enabled Default (298):   0, 0, 0
    libinput Button Scrolling Button (299): 2
    libinput Button Scrolling Button Default (300): 2
    ...

现在您已经拥有了更改某些属性值所需的一切,例如:

xinput set-prop 9 'libinput Natural Scrolling Enabled' 1

请注意,这是以您当前登录的用户身份而不是 root 身份完成的:这是使用鼠标的用户。

如果出于某种原因你需要在启动时运行它,请将其放入/etc/profile

相关内容