对于 Mac 和 Windows,查看您的操作系统中是否存在自定义鼠标滚动设置。
对于 Linux,这就是答案。使用 Sublime Text 3 和 4 在 Ubuntu 18.04 和 20.04 上测试。
# create a file called ".imwheelrc" in your home dir
gedit ~/.imwheelrc
复制并粘贴以下内容:
# For Sublime Text
"sublime_text"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
两个3s 是设置鼠标滚轮滚动速度的。它们是正常速度的乘数,所以 3 快 3 倍。在我的例子中,一个鼠标滚轮刻度现在滚动 9 行而不是 3 行,因为我将上下速度设置为 3 以上。
现在安装imwheel:
sudo apt update
sudo apt install imwheel
运行imwheel -b "4 5" 以测试您的设置。完成测试后,运行killall imwheel 将其杀死,然后根据需要对~/.imwheelrc 进行编辑,然后再次运行imwheel -b "4 5" 进行更多测试。
完成!
在 Linux 中修复了 Sublime Text 3 鼠标滚轮的滚动速度!
注意:如果您也想调整 Google Chrome 和 Slack 的鼠标滚轮滚动速度,这里还有一些条目:
# For `google-chrome`
"-chrome"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
# For `slack`
"slack"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
# For Sublime Text 3
"sublime_text"
None, Up, Button4, 3
None, Down, Button5, 3
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
这是我在 GitHub 上的 eRCaGuy_dotfiles 项目的一部分。您可以使用以下命令仅下载我的“~/.imwheelrc”文件here 或此处 (raw):
wget https://raw.githubusercontent.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/master/home/.imwheelrc
参考资料:
- 我在 GitHub 上的 eRCaGuy_dotfiles 项目和 the "~/.imwheelrc" file。
- 我的系统配置为 Ctrl + Alt + P(此处 P 代表“touch'P'ad”)切换我的触摸板打开和关闭,还与触摸板相反地打开和关闭我的
imwheel 程序。在我的 eRCaGuy_dotfiles 项目中查看我的 "touchpad_toggle.sh" 脚本。
- 我还将它配置为在启动时运行,以便我的触摸板始终处于关闭状态,而我的
imwheel 始终处于打开状态,以在每次打开计算机时修复这些程序中的鼠标滚轮滚动速度。强>
- 我在 AskUbuntu 上的回答:"Permanently fix Chrome scroll speed"