在 Mac OS X 中禁用鼠标加速

发布于 2024-11-03 04:16:48 字数 1459 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

找回味觉 2024-11-10 04:16:48

这个答案是在错误的网站上!

我在 StackOverflow 上的声誉很大程度上来自于人们对这个答案的投票,我早在意识到有几个堆栈交换网站并且 StackOverflow 仅用于编程问题和答案之前就写了这个答案。因此,如果您想编写自己的鼠标驱动程序,上面的问题是如何解决这个问题。对于所有其他讨论,请前往超级用户网站,其中它属于。

原始答案如下。


说明

您可以从终端更改一个隐藏的首选项。 读取其当前值类型

defaults read .GlobalPreferences com.apple.mouse.scaling

在终端提示符处 。正常值为 0 ~ 3,可以通过移动“系统偏好设置”的“鼠标”窗格中的“跟踪速度”滑块来设置。因此,0 ~ 3 的值不会禁用加速。

如何禁用加速

但是,如果您通过

defaults write .GlobalPreferences com.apple.mouse.scaling -1

在终端中键入将其设置为 -1,则似乎会禁用加速并将鼠标跟踪速度设置为某个您无法更改的恒定预定义值。

我发现我必须注销并重新登录才能生效。此后,像素指针移动/米鼠标移动比率是恒定,但不幸的是不可调整

如何撤消更改

要恢复为 Apple 默认设置,只需打开“系统偏好设置”的“鼠标”面板,将“跟踪速度”更改为任意值,然后退出“系统偏好设置”。

鼠标 ≠ 触控板

Mac OS X 独立存储鼠标和触控板设置。如果您想禁用触控板而不是鼠标上的加速,说明是相同的,只需在看到 com.apple.mouse.scaling 的地方替换为 com.apple.trackpad.scaling上面的(显然,使用系统偏好设置的触控板窗格而不是鼠标窗格)。

注释

我不会引用来源,因为这个技巧可以在网络上的很多地方找到。我在 OS 10.7 Lion 中尝试过,但许多来源声称使用的是 10.6 Snow Leopard。

This answer is on the wrong website!

A lot of my reputation on StackOverflow has come from people voting up this answer, which I wrote way back before I realised that there are several stack exchange websites and that StackOverflow is for programming questions and answers only. Therefore the question above is about how to tackle this if you want to code your own mouse drivers. For all other discussion, go have it here on the superuser site where it belongs.

Original answer follows.


Explanation

There's a hidden preference that you can change from the Terminal. To read its current value type

defaults read .GlobalPreferences com.apple.mouse.scaling

at the Terminal prompt. Normal values are 0 ~ 3, which can be set by moving the 'Tracking Speed' slider in the Mouse pane of System Preferences. Values of 0 ~ 3 won't disable acceleration, therefore.

How to Disable Acceleration

However, if you set it to -1 by typing

defaults write .GlobalPreferences com.apple.mouse.scaling -1

in the Terminal, that seems to disable acceleration and set the mouse tracking speed to some constant predefined value which you can't change.

I found I had to log out and back in again for it to take effect. After that, the pixels pointer moves / meters mouse moved ratio is constant but unfortunately not adjustable.

How to Undo Changes

To revert back to Apple default settings, just open the Mouse pane of System Preferences and change the Tracking Speed to anything, then quit System Preferences.

Mouse ≠ Trackpad

Mac OS X stores mouse and trackpad settings independently. If you want to disable acceleration on a trackpad instead of a mouse, the instructions are the same, just replace with com.apple.trackpad.scaling wherever you see com.apple.mouse.scaling in the above (and use the Trackpad pane of System Preferences instead of the Mouse pane, obviously).

Notes

I won't cite a source, since this tip is available in many places on the web. I tried it in OS 10.7 Lion, but many of the sources claim to be using 10.6 Snow Leopard.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文