可能您的鼠标需要设置其他属性。请尝试以下操作:
找到您的鼠标ID(下面是我的10):
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB-PS/2 Optical Mouse id=10 [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)]
↳ Power Button id=7 [slave keyboard (3)]
↳ USB Keyboard id=8 [slave keyboard (3)]
↳ USB Keyboard id=9 [slave keyboard (3)]
列出鼠标的可用属性(用鼠标的ID替换10):
$ xinput list-props 10
Device 'Logitech USB-PS/2 Optical Mouse':
Device Enabled (136): 1
Coordinate Transformation Matrix (138): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (273): 0.000000
libinput Accel Speed Default (274): 0.000000
libinput Accel Profiles Available (275): 1, 1
libinput Accel Profile Enabled (276): 1, 0
libinput Accel Profile Enabled Default (277): 1, 0
libinput Natural Scrolling Enabled (278): 1
libinput Natural Scrolling Enabled Default (279): 0
libinput Send Events Modes Available (258): 1, 0
libinput Send Events Mode Enabled (259): 0, 0
libinput Send Events Mode Enabled Default (260): 0, 0
libinput Left Handed Enabled (280): 0
libinput Left Handed Enabled Default (281): 0
libinput Scroll Methods Available (282): 0, 0, 1
libinput Scroll Method Enabled (283): 0, 0, 0
libinput Scroll Method Enabled Default (284): 0, 0, 0
libinput Button Scrolling Button (285): 2
libinput Button Scrolling Button Default (286): 2
libinput Middle Emulation Enabled (287): 0
libinput Middle Emulation Enabled Default (288): 0
Device Node (261): "/dev/input/event2"
Device Product ID (262): 1133, 49215
libinput Drag Lock Buttons (289): <no items>
libinput Horizontal Scroll Enabled (290): 1
如您所见,我的鼠标有一个名为“ libinput Natural Scrolling Enabled”的属性,本例中的数字为278。
将其设置为1并应启用自然滚动(将10替换为鼠标ID,将278替换为实际的属性编号):
$ xinput set-prop 10 278 1