Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Clicking -int 0
defaults write GlobalPreferences -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

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

defaults -currentHost write -globalDomain -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
In addition to automation, it's a nice log of one's preferences. – Matt Tagg Oct 19 '14 at 5:44

I had the following in my .osx file:

# Enable tap to click (Trackpad) for this user and for the login screen
defaults write Clicking -bool true
defaults -currentHost write NSGlobalDomain -int 1
defaults write NSGlobalDomain -int 1
share|improve this answer

Your Answer


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.