将鼠标灵敏度降低至标准限值以下

Mal*_*rba 49 mouse gnome 10.10

我的 Ubuntu 笔记本上连接了一个 USB 鼠标。这款鼠标(不幸的是)非常敏感,因此有时很难用鼠标指针点击小图标。这确实是一个硬件问题,它不是错误,也不是 Ubuntu/gnome 的错。尽管如此,我还是非常希望通过软件解决这个问题(通过硬件解决意味着购买新鼠标)。

回到 Windows,如果我将灵敏度设置得非常低,那就足够舒服了。在 Ubuntu 中,即使是可用的最低灵敏度和加速度(在System>Prerences>Mouse菜单中)仍然令人沮丧。如何将其降低到默认最小值以下?

我试过xset,但它似乎xset只处理加速度和阈值,而不是实际的灵敏度。

小智 58

我有一个 Razer DeathAdder 鼠标,就像你的情况一样,即使我把它们放在鼠标首选项中的最低级别,灵敏度/加速度也太高了。所以为了解决这个问题,我使用了 xinput 命令。

首先,您需要您的鼠标 ProductName 和 ID:

xinput list
...
 Razer Razer DeathAdder                     id=8    [slave  pointer  (2)]
...
Run Code Online (Sandbox Code Playgroud)

然后使用以下命令设置适合您需要的恒定减速级别:

xinput set-prop 8 "Device Accel Constant Deceleration" 3
# 8 = DEVICE_ID
# 3 = LEVEL (factor) Higher = Slower.
Run Code Online (Sandbox Code Playgroud)

为了使配置持久化(并使其在系统范围内),您需要编辑您的 xorg.conf ( /etc/X11/xorg.conf)。

Section "InputClass"
   Identifier      "Razer"                    # Whatever you want.
   MatchProduct    "Razer Razer DeathAdder"   # Product name from xinput list.
   Option          "ConstantDeceleration" "3" # The same value as xinput.
EndSection
Run Code Online (Sandbox Code Playgroud)

重新启动后,您应该得到与 xinput 命令相同的结果。

如果有帮助,请告诉我。

  • 呸:“属性‘Device Accel Constant Deceleration’不存在,你需要指定它的类型和格式 (5认同)
  • 如果我没有 `xorg.conf` 文件,我应该创建它吗? (3认同)

Gle*_*son 11

Ubuntu 17.04

按照以下说明进行操作,但要更改:

xinput set-prop 10 "Device Accel Constant Deceleration" 3
Run Code Online (Sandbox Code Playgroud)

到:

xinput set-prop 10 "libinput Accel Speed" -0.4
Run Code Online (Sandbox Code Playgroud)

谢谢@tambre。不确定这是否与旧环境一样理想,但非常接近。

xset m 3
Run Code Online (Sandbox Code Playgroud)

这仍然非常有效。需要弄清楚如何保存,因此这是重新启动时的默认设置。

Ubuntu 16.04

@JackTravis 的回答非常有帮助,但我认为 16.04 值得更新,因为 xorg.conf 文件已移动并被拆分为多个文件。在写这个答案之前,我尝试使用xset并玩xinput了一段时间的设置,然后决定 JackTravis 的xinput ConstantDeceleration 3设置是我台式机上的 Logitech M510 和笔记本电脑上的一些较旧的有线鼠标的最佳设置。

1. 列出小鼠

$ xinput list
? Virtual core pointer                      id=2    [master pointer  (3)]
?   ? Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
?   ? Logitech M510                             id=10   [slave  pointer  (2)]
?   ? Synaptics Inc. Composite TouchPad / TrackPoint    id=13   [slave  pointer  (2)]
...
Run Code Online (Sandbox Code Playgroud)

我的鼠标是Logitech M510id=10所以我将在这个例子中使用它。您需要用鼠标的名称替换它。现在,xinput set-prop请尝试各种设置,直到您的鼠标完全按照您的意愿移动。在10下面的对应于id=10我的鼠标我的系统上。你可能不得不改变它。

2. 暂时更改您的设置

$ xinput set-prop 10 "Device Accel Constant Deceleration" 3
Run Code Online (Sandbox Code Playgroud)

如果您想知道还有哪些其他设置会影响您的设备,请尝试

$ xinput --list-props 10
Run Code Online (Sandbox Code Playgroud)

在我真的搞砸了设置之后要清除它们,我所要做的就是拔下并重新插入我的鼠标。

3. 永久保存新设置

如果你喜欢的3 ConstantDeceleration,那么你需要添加一个xorg.conf文件新的Ubuntu 16.04的方法:通过添加一个新的文件在/usr/share/X11/xorg.conf.d/ 你将要改变Logitech M510,并logitech-m510在文件名来匹配你的鼠标。我认为60-文件名的开头是加载这些文件的优先级。以下单行 shell 命令是我machineSetup.sh在 Dropbox中的文件中的内容,以便我可以在全新安装后的几分钟内快速定制我喜欢的新机器:

sudo sh -c "echo 'Section \"InputClass\"\n\
   Identifier      \"My awesome new mouse\"\n\
   MatchProduct    \"Logitech M510\"\n\
   Option          \"ConstantDeceleration\" \"3\"\n\
EndSection\n' > /usr/share/X11/xorg.conf.d/60-logitech-m510.conf"
Run Code Online (Sandbox Code Playgroud)

或者,如果您想以 GUI 方式进行操作,请以 root 身份打开编辑器,然后将以下内容粘贴并编辑到/usr/share/X11/xorg.conf.d/60-<whatever>.conf

Section "InputClass"
   Identifier      "My Awesome Blue Mouse"
   MatchProduct    "Logitech M510"
   Option          "ConstantDeceleration" "3"
EndSection
Run Code Online (Sandbox Code Playgroud)

4. 重启

就是这样。只需重新启动并验证新设置是否生效。

  • 列出属性后,“设备加速恒定减速度”不存在。它似乎使用libinput作为驱动程序,所以我不得不修改`libinput Accel Speed`的值,它的有效值是从-1到1。 (2认同)