您可能已经看到了,这是我的第一篇文章。因此,我已经尝试并研究了很多,但我仍然无法解决这个问题。
我真的很喜欢自然滚动,不仅在触摸板上,在鼠标上也一样——但到目前为止,这还不起作用。我目前的设置是 Ubuntu 18.04.2,安装在 2012 年末的 MacBook(第一台 hidpi)上,配有 i3 wm,我使用性能 MX 罗技鼠标。这是我昨天安装的一个相当新的设置。
我确实使用 synaptics 反转了触摸板滚动并尝试使用 xmodkeys 修改鼠标键,但没有效果。
xmodmap -e 'pointer = 1 2 3 5 4 6 7 8 9 10 11 12'
奇怪的是,当我使用 xev 测试时,我的鼠标按钮实际上是反转的(4 和 5),但这不会影响滚动行为。我也可以重新映射其他鼠标键,但滚动似乎无法改变。
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Performance MX id=10 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [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)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ FaceTime HD Camera (Built-in): id=11 [slave keyboard (3)]
↳ Apple Inc. Apple Internal Keyboard / Trackpad id=12 [slave keyboard (3)]
xinput list-props 10
Device 'Logitech Performance MX':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (278): 0
libinput Natural Scrolling Enabled Default (279): 0
libinput Scroll Methods Available (280): 0, 0, 1
libinput Scroll Method Enabled (281): 0, 0, 0
libinput Scroll Method Enabled Default (282): 0, 0, 0
libinput Button Scrolling Button (283): 2
libinput Button Scrolling Button Default (284): 2
libinput Middle Emulation Enabled (285): 0
libinput Middle Emulation Enabled Default (286): 0
libinput Accel Speed (287): 0.000000
libinput Accel Speed Default (288): 0.000000
libinput Accel Profiles Available (289): 1, 1
libinput Accel Profile Enabled (290): 1, 0
libinput Accel Profile Enabled Default (291): 1, 0
libinput Left Handed Enabled (292): 0
libinput Left Handed Enabled Default (293): 0
libinput Send Events Modes Available (263): 1, 0
libinput Send Events Mode Enabled (264): 0, 0
libinput Send Events Mode Enabled Default (265): 0, 0
Device Node (266): "/dev/input/event5"
Device Product ID (267): 1133, 4122
libinput Drag Lock Buttons (294): <no items>
libinput Horizontal Scroll Enabled (295): 1
我希望得到任何支持,因为我真的希望能够恢复自然滚动:> 和平!
答案1
编辑/usr/share/X11/xorg.conf.d/40-libinput.conf
Option "NaturalScrolling" "True"
像这样添加:
对于你的鼠标:
# Match on all types of devices but joysticks
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "True"
EndSection
对于触摸板:
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "True"
EndSection
然后注销并重新登录进行申请。
答案2
跑步xinput
:
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ DELL0945:00 27C6:01F0 Mouse id=11 [slave pointer (2)]
⎜ ↳ DELL0945:00 27C6:01F0 Touchpad id=12 [slave pointer (2)]
⎜ ↳ PS/2 Generic Mouse id=17 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Integrated_Webcam_HD: Integrate id=10 [slave keyboard (3)]
↳ Intel HID events id=13 [slave keyboard (3)]
↳ Intel HID 5 button array id=14 [slave keyboard (3)]
↳ Dell WMI hotkeys id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
找到您的触摸板设备并列出其属性:
$ xinput list-props "DELL0945:00 27C6:01F0 Touchpad"
Device 'DELL0945:00 27C6:01F0 Touchpad':
Device Enabled (214): 1
Coordinate Transformation Matrix (216): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (372): 1
libinput Tapping Enabled Default (373): 0
libinput Tapping Drag Enabled (374): 1
libinput Tapping Drag Enabled Default (375): 1
libinput Tapping Drag Lock Enabled (376): 0
libinput Tapping Drag Lock Enabled Default (377): 0
libinput Tapping Button Mapping Enabled (378): 1, 0
libinput Tapping Button Mapping Default (379): 1, 0
libinput Natural Scrolling Enabled (351): 0
libinput Natural Scrolling Enabled Default (352): 0
libinput Disable While Typing Enabled (380): 1
libinput Disable While Typing Enabled Default (381): 1
libinput Scroll Methods Available (353): 1, 1, 0
libinput Scroll Method Enabled (354): 1, 0, 0
libinput Scroll Method Enabled Default (355): 1, 0, 0
libinput Click Methods Available (382): 1, 1
libinput Click Method Enabled (383): 1, 0
libinput Click Method Enabled Default (384): 1, 0
libinput Middle Emulation Enabled (385): 0
libinput Middle Emulation Enabled Default (386): 0
libinput Accel Speed (360): 0.000000
libinput Accel Speed Default (361): 0.000000
libinput Accel Profiles Available (362): 1, 1
libinput Accel Profile Enabled (363): 1, 0
libinput Accel Profile Enabled Default (364): 1, 0
libinput Left Handed Enabled (365): 0
libinput Left Handed Enabled Default (366): 0
libinput Send Events Modes Available (336): 1, 1
libinput Send Events Mode Enabled (337): 0, 0
libinput Send Events Mode Enabled Default (338): 0, 0
Device Node (339): "/dev/input/event5"
Device Product ID (340): 10182, 496
libinput Drag Lock Buttons (367): <no items>
libinput Horizontal Scroll Enabled (368): 1
libinput Scrolling Pixel Distance (369): 15
libinput Scrolling Pixel Distance Default (370): 15
libinput High Resolution Wheel Scroll Enabled (371): 1
将自然滚动启用属性设置为1
:
$ xinput set-prop "DELL0945:00 27C6:01F0 Touchpad" "libinput Natural Scrolling Enabled" 1