linux - 如何在 Linux 上独立于鼠标版本和类型明确设置鼠标速度/加速度

标签 linux shell unix command-line mouse

问题是我的鼠标速度和加速度太高,系统设置(Ubuntu)完全没用,所以我需要一个外部工具/技巧来调整它。

那么,如何在不手动执行命令的情况下在启动时绝对减慢鼠标速度?

xinput list 的输出是:

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SYN1B7E:01 06CB:2970 UNKNOWN              id=14   [slave  pointer  (2)]
⎜   ↳ MOSART Semi. 2.4G Keyboard Mouse          id=12   [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)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ CHICONY USB Keyboard                      id=10   [slave  keyboard (3)]
    ↳ HD WebCam                                 id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=15   [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                          id=16   [slave  keyboard (3)]
    ↳ MOSART Semi. 2.4G Keyboard Mouse          id=11   [slave  keyboard (3)]

现在,在启动时我设置了这个命令: xinput --set-prop "pointer:MOSART Semi. 2.4G Keyboard Mouse""libinput Accel Speed"-0.7 但显然没有任何原因,有时鼠标会回到其初始速度值......

此外,有时在启动时该命令不起作用。

我的目标很简单,就是让鼠标始终具有可接受的速度!

谢谢!

最佳答案

要设置速度,请使用:

xinput --set-prop device_id_or_name "Device Accel Constant Deceleration" number

在你的情况下:

xinput --set-prop "MOSART Semi. 2.4G Keyboard Mouse" "Device Accel Constant Deceleration" -0.7

将以上内容保存在一个文件中作为 ~/.xprofile。

关于linux - 如何在 Linux 上独立于鼠标版本和类型明确设置鼠标速度/加速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47141602/

相关文章:

c - 使用 switch 语句 fork 两个进程

c - 非阻塞标准输出[C/Linux]

c++ - 检查文件描述符中可用缓冲区字符的数量

linux - curl 特定 header 的 "write out"值

linux - crontab 下安装的脚本未运行

file - 使新文件自动执行?

c - 具有多个客户端 C/unix 的简单 TCP 服务器

java - 如何使用 Netty 连接到 docker.sock?

python - 子进程 Python .. 将命令串在一起

检查用户及其组的 Linux 脚本