如何在17.04中使用鼠标自然滚动?
以前工作过
echo "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap
没用
在我的情况下,没有必要删除任何包。 /usr/share/X11/xorg.conf.d/40-libinput.conf
中缺少的唯一一行是:
Option "NaturalScrolling" "on"
所以整个部分看起来如下:
Section "InputClass" Identifier "libinput pointer catchall" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Option "NaturalScrolling" "on" Driver "libinput" EndSection
重新启动X会话后,我的鼠标正常工作。
对我来说,解决方案是安装xserver-xorg-input-libinput
,而是删除xserver-xorg-input-synaptics
,然后重启。 似乎升级安装了两者并默认选择了synaptic,这似乎没有自然的滚动选项。
(我在戴尔XPS 15 9530上运行Ubuntu Gnome 17.04,顺便说一下)
我刚刚从Ubuntu 16.10升级到17.04,有些东西坏了,包括自然鼠标滚动。 注意 – 我在桌面上有一个普通鼠标(Evoluent),而不是触控板。 我以前在Ubuntu 16中使用过这个解决方案: 反向两个手指滚动方向(自然滚动)? ,但这在Ubuntu 17中不起作用。以下是在Ubuntu 17.04中对我有用的内容:
首先,删除xserver-xorg-input-libinput
包:
sudo apt remove xserver-xorg-input-libinput
然后使用以下内容创建文件/usr/share/X11/xorg.conf.d/20-natural-scrolling-mouses.conf
:
Section "InputClass" Identifier "Natural Scrolling Mouses" MatchIsPointer "on" MatchIsTouchpad "off" MatchDevicePath "/dev/input/event*" Option "VertScrollDelta" "-1" Option "HorizScrollDelta" "-1" Option "DialDelta" "-1" EndSection
然后重新启动计算机。
xinput命令也可用于更改此设置。 把它放在.profile中,这样它就可以在每次启动时执行。 这是我在我的内容:
# # Set natural scrolling with apple mouse # for usage information, type xinput by itself. Other useful commands are # xinput list-props 10 -- to find out settable property numbers (275) # xinput list -- to find out that 10 is the device ID of the mouse # xinput set-prop 10 275 -1 1 1
不完全确定这将从Ubuntu 16.04(LTS)转换为17.04及更高版本,但它与其他任何建议都不同。 值得一提的是:
使用dconf编辑器
找到设置: org.gnome.desktop.peripherals.mouse并选中“自然滚动”框。 默认为未选中(false)。
并非dconf模式中提供的所有选项都在UI中公开。 我的猜测是试图保持UI简单,这是IMO值得努力的。
注意 :我不清楚dconf如何与之前配置的xinput进行交互。 dconf是否具有相同的xinput设置? dconf是否是xinput之上的实际层,这样如果你在两个地方更改了设置,它将被有效撤消? 只有你忘记并尝试两件事情才有意义……