Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I couldn't figure out where the settings I change with the "Mouse" system preferences are stored. Neither plist ~/Library/Preferences/com.apple..plist nor /Library/Preferences/com.apple..plist changes significantly if I change the mouse pointer speed.

My problem: at work I plug in a usb mouse, at home I use my bluetooth mouse. When I switch I always have to change the speed because for usb the slider must be at the very left, for bluetooth mouse far at the right. So I wanted to write a script that changes and was hoping to be able to use

defaults write ...
share|improve this question

1 Answer 1

up vote 3 down vote accepted

The tracking speed is stored in ~/Library/Preferences/.GlobalPreferences.plist.

$ defaults read -g | grep mouse
    "com.apple.mouse.doubleClickThreshold" = "1.1";
    "com.apple.mouse.scaling" = "2.5";

The slowest speed shown in System Preferences is 0.0 and the highest is 3.0

You can change the speed by editing the plist directly or with defaults, but you have to log out and back in.

defaults write -g com.apple.mouse.scaling -float 2.1

This would change the speed immediately:

tell application "System Preferences"
    reveal pane "com.apple.preference.mouse"
end tell
tell application "System Events" to tell process "System Preferences"
    set value of slider 3 of window 1 to 9.0 -- maximum, minimum is 0.0
end tell
quit application "System Preferences"
share|improve this answer
    
Works perfectly. Thanks a lot! –  Karsten S. Jan 9 '13 at 7:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.