Skip to content

Instantly share code, notes, and snippets.

@tzhenghao
Created March 18, 2018 17:53
Show Gist options
  • Save tzhenghao/17ac5aeab12a89441be20ecfadf1dfd3 to your computer and use it in GitHub Desktop.
Save tzhenghao/17ac5aeab12a89441be20ecfadf1dfd3 to your computer and use it in GitHub Desktop.
Disable MacOS mouse acceleration
#!/bin/bash
set -euo pipefail
# Author: Zheng Hao Tan
# Email: [email protected]
# This shell scripts disables mouse acceleration on a MacOS device.
echo 'The current mouse scaling value is:'
defaults read .GlobalPreferences com.apple.mouse.scaling
echo 'Disabling mouse acceleration...'
defaults write .GlobalPreferences com.apple.mouse.scaling -1
echo 'Done!'
echo 'The final mouse scaling value is:'
defaults read .GlobalPreferences com.apple.mouse.scaling
@bronze
Copy link

bronze commented Dec 20, 2019

thank you!
this just helped me troubleshoot where the hell acceleration was coming from!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment