有没有办法在 KDE4 中提高鼠标速度?我不想要任何指针加速,我只想改变鼠标速度。
编辑:不幸的是,编辑 xorg.conf 不是我的选择,因为我希望用户能够自己配置鼠标速度,并且公司政策拒绝用户更改 xorg.conf 的权限。
Luk*_*uke 35
KDE 尚未将其内置到其控制中心,但您可以从命令行使用 xinput。首先,运行xinput list以查找鼠标的设备号:
$ xinput list
? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]
? Virtual core keyboard id=3 [master keyboard (2)]
? Virtual core XTEST keyboard id=5 [slave keyboard (3)]
? AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
Run Code Online (Sandbox Code Playgroud)
在我的笔记本电脑上,我想要的设备 ID 是 10(SynPS/2 Synaptics TouchPad)。在您的系统上,您必须决定哪个设备是正确的。接下来,运行xinput list-props <your device id>以查看该设备的当前设置:
$ xinput list-props 10
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (144): 1
Device Accel Profile (266): 1
Device Accel Constant Deceleration (267): 2.500000
Device Accel Adaptive Deceleration (268): 1.000000
Device Accel Velocity Scaling (269): 12.500000
[ many more settings omitted ]
Run Code Online (Sandbox Code Playgroud)
您感兴趣的属性是“Device Accel Constant Deceleration (267)”。要减慢鼠标速度,必须通过运行来增加该值xinput set-prop <your device id> <property id> <value>:
$ xinput set-prop 10 267 5.0
Run Code Online (Sandbox Code Playgroud)
在本例中,该值从 2.5 增加到 5.0,鼠标以半速移动。
Hi-*_*gel 20
只需强制指针跳过像素,方法如下:
首先列出输入设备:
$ xinput list
? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? PixArt USB Optical Mouse id=10 [slave pointer (2)]
? ? ETPS/2 Elantech Touchpad id=15 [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)]
? Sleep Button id=8 [slave keyboard (3)]
? USB2.0 UVC 2M WebCam id=9 [slave keyboard (3)]
? Asus Laptop extra buttons id=13 [slave keyboard (3)]
? AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
? USB Keyboard id=11 [slave keyboard (3)]
? USB Keyboard id=12 [slave keyboard (3)]
Run Code Online (Sandbox Code Playgroud)
在示例中,我们看到鼠标是PixArt USB Optical Mouse。接下来列出它的属性:
$ xinput list-props "PixArt USB Optical Mouse"
Device 'PixArt USB Optical Mouse':
Device Enabled (140): 1
Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (265): 0
Device Accel Constant Deceleration (266): 1.000000
Device Accel Adaptive Deceleration (267): 1.000000
Device Accel Velocity Scaling (268): 10.000000
Device Product ID (260): 2362, 9488
Device Node (261): "/dev/input/event5"
Evdev Axis Inversion (269): 0, 0
Evdev Axes Swap (271): 0
Axis Labels (272): "Rel X" (150), "Rel Y" (151), "Rel Vert Wheel" (264)
Button Labels (273): "Button Left" (143), "Button Middle" (144), "Button Right" (145), "Button Wheel Up" (146), "Button Wheel Down" (147), "Button Horiz Wheel Left" (148), "Button Horiz Wheel Right" (149)
Evdev Middle Button Emulation (274): 0
Evdev Middle Button Timeout (275): 50
Evdev Third Button Emulation (276): 0
Evdev Third Button Emulation Timeout (277): 1000
Evdev Third Button Emulation Button (278): 3
Evdev Third Button Emulation Threshold (279): 20
Evdev Wheel Emulation (280): 0
Evdev Wheel Emulation Axes (281): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (282): 10
Evdev Wheel Emulation Timeout (283): 200
Evdev Wheel Emulation Button (284): 4
Evdev Drag Lock Buttons (285): 0
Run Code Online (Sandbox Code Playgroud)
通过更改“坐标变换矩阵”属性,我们可以提高指针速度。文档说它用于计算指针移动。引用:
默认情况下,X 中每个输入设备的 CTM 都是单位矩阵。例如,假设您在屏幕上的 (400, 197) 点触摸触摸屏:
Run Code Online (Sandbox Code Playgroud)? 1 0 0 ? ? 400 ? ? 400 ? ? 0 1 0 ? · ? 197 ? = ? 197 ? ? 0 0 1 ? ? 1 ? ? 1 ?设备事件的 X 和 Y 坐标输入到计算的第二个矩阵中。计算的结果是事件的 X 和 Y 坐标映射到屏幕的位置。如图所示,单位矩阵将设备坐标映射到屏幕坐标,没有任何变化。
因此,我们要增加X和Y值,其余保持不变。我电脑上的一个例子:
$ xinput set-prop "PixArt USB Optical Mouse" "Coordinate Transformation Matrix" 2.4 0 0 0 2.4 0 0 0 1
Run Code Online (Sandbox Code Playgroud)
稍微玩一下,直到您对速度感到满意为止。
这些更改仅对当前会话有效,因此一旦您选择了良好的敏感度,您可以通过将其添加到xorg.conf (或创建类似 的文件/etc/X11/xorg.conf.d/40-mouse-sensitivity.conf)来永久应用它:
Section "InputClass"
Identifier "PixArt USB Optical Mouse"
MatchIsPointer "Yes"
Option "TransformationMatrix" "2.4 0 0 0 2.4 0 0 0 1"
EndSection
Run Code Online (Sandbox Code Playgroud)
感谢来自 Xorg 邮件列表的 Simon Thum 提供有关矩阵的提示。
UPD:请注意,在 Wine 中运行的一些 Windows 游戏可能会开始表现出奇怪的指针行为(例如,有人注意到无论您如何移动鼠标,反恐精英 1.6 中的十字准线都会下降直到盯着地板),在这种情况下只需重置X和在运行游戏之前,CTM 的Y回到1。
exh*_*uma 16
Linux (Xorg) 中鼠标设置的术语与 Windows 世界略有不同。
有三个重要的设置:
threshold - 加速的触发器acceleration - 达到阈值后的速度resolution - 速度”这些设置独立于桌面环境。它们是纯 X 设置。所以这总是有效的。另请参阅更改这些设置的真正独立方式的鼠标部分xset。
Unity 设置管理器似乎将threshold敏感度重命名为。但是当您谈论 KDE 时,这应该无关紧要。
只有threshold和acceleration可以由用户来改变。这resolution是要在 中进行的设置xorg.conf。但通常情况下,前两个设置对于大多数用户来说已经足够了。
Linuxreviews对这些值进行了解释。
基本上:鼠标以基本速度移动(可使用 修改resolution)。如果鼠标在短时间内移动n 个像素 (n = threshold),则基本速度乘以acceleration。例如,如果您想完全禁用加速,则可以将阈值设置为0。换句话说:如果鼠标0在短时间内移动像素,我将使用base-speed * acceleration. 因此,阈值0为您提供恒定的鼠标速度。
因此,这两个值可让您对速度进行非常精细的控制。
| 归档时间: |
|
| 查看次数: |
87913 次 |
| 最近记录: |