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 want to change the trackpad tap-to-click property from the command line. Graphically, I can do it by clicking System Preferences -> Trackpad -> Tap to Click. How can I do it from the command line?

I have tried:

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -int 0
defaults write GlobalPreferences com.apple.mouse.tapBehavior -int 0

but these didn't work (with int as 1 and 0, with reboot). Am I missing some step? I have Macbook 5,1 Snow Leopard.

share|improve this question
    
How do you know that those are the correct keys for the tap-to-click behavior? Have you diffed the relevant files before and after changing the preference in the system GUI? –  CajunLuke Apr 9 '12 at 18:13
    
Both lines are instructions from google searches and the upperone is changed when I use gui. I also tried with -bool true/false as Clicking-key is actually boolean. Is there other places what I should tinker with? Like "allow-command-line-access = true"? –  Juha Apr 9 '12 at 18:22
    
There's no allow-command-line-access setup; defaults should work. Have you checked boolean YES/NO or string true/false/yes/no? –  CajunLuke Apr 9 '12 at 18:48
add comment

2 Answers 2

I had the following in my .osx file:

# Enable tap to click (Trackpad) for this user and for the login screen
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
share|improve this answer
add comment

Got it to work. The correct format (for me) is:

defaults -currentHost write -globalDomain com.apple.mouse.tapBehavior -int 0

Change 0 to 1 if you want to enable the tap-to-click. This seems to be really sensitive to which version you are using. The commands in the question have worked for others.

Logout - login is required for this to work.

share|improve this answer
    
If you need to logout and login, what do you gain by avoiding Sys Pref GUI? –  Tal Aug 9 '12 at 6:37
    
Do it for 100 computers/accounts after every upgrade (once per year). Command line automates banal tasks. –  Juha Aug 13 '12 at 12:06
add comment

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.