Turning On Mac Touch-To-Click Support from the Command Line

Jan 31, 2014 - 13 Comments

Enabling touch clicking from the command line of Mac OS X Touch-based clicking is an alternate input form that uses trackpad (or Magic Mouse) taps as a click. For most Mac users, turning on tap-to-click is best done from Mac OS X System Preferences, but advanced users who require more control, automation, or remote enabling of the feature can also enable tap-to-click through the command line by using defaults strings. Using this advanced method also offers the benefit of allowing touch-clicking at the login screens of Mac OS X, something that isn’t available by default if enabled through the GUI controls.

Using touch-to-click or tap-to-click requires a multitouch compatible Mac trackpad or mouse, whether that’s a newer model MacBook Pro or Air, or a Magic Trackpad or Magic Mouse. If you’re not comfortable with the command line and Terminal, you’re better off using this approach instead.

How to Enable Universal Tap-Clicking on a Mac from the Terminal

You’ll notice there are three separate and unique defaults strings listed, one of which enables the general tap click behavior, while the next enables the feature for the Magic Mouse, and the other provides support for tap-to-click at the login and boot screens of Mac OS X. To be thorough and get full touch-click support throughout Mac OS, issue all commands separately in the Terminal, then reboot the Mac. As usual, each command should be placed on a single line when executed at the terminal.

defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true

sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true

sudo defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

These defaults strings have been tested to work in many versions of MacOS system software, including macOS Mojave, macOS High Sierra, MacOS Sierra, OS X El Capitan, OS X Yosemite, Mac OS X Mavericks, and others. If you have other experiences or commands related with these defaults strings for enabling tap-to-click then share them in the comments below.

How to Disable Tap-Clicking from the Terminal

If you want to reverse the above settings, or remotely disable the feature on a Mac, you can use the following defaults strings to turn off touchpad clicking. You’ll notice this is mostly a matter of looking at the above defaults strings and switching ‘true’ to ‘false’ and 1 to 0 where appropriate. Just as above, issue all three commands to be thorough:

defaults write com.apple.AppleMultitouchTrackpad Clicking -bool false

sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool false

sudo defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 0

sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 0

Again, reboot the Mac for all changes to take effect when using this command line approach.

Optionally you can also disable tap-to-click by going to System Preferences on the Mac and adjusting the tap-to-click Mac trackpad settings.

Do you know of another method for enabling and disabling tap-to-click from the command line of the Mac? Share them in the comments below!


Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks


» Comments RSS Feed

  1. Maty says:

    Hi, many thanks for this help. After reinstall High Sierra 10.13.6 on my Macbook Pro 13 inch mid 2012 touch click not working. After days searching found your solution and it works. The only thing not get to work is the double touch click to open files or folders. Is there also any solution available..?
    In System Settings / Accessibility or Trackpad are no possible settings to do that.

    Thanks for any help.

    • Maty says:

      Holly Molly….
      All good. Double Click works also on Files and Folders.
      In Settings/Accessibility was “Double Click Speed” on maximum Speed. So, reduce this a bit an it works now…
      Have nice MacDay

  2. Belka says:

    Thanks a lot , it works on high sierra

  3. Mark says:

    Hey, this worked on Big Sur 11.5.1! Thanks for posting this!

  4. Priyanshu Sinha says:

    Thanks man, works on Mojave and I was searching the whole internet for this.

  5. Alex says:

    This used to be an standard option in snow leopard, I really hate everything that Tim Cook and others have done to this once great OS.

  6. david says:

    works very well in Mojave, thank you.

  7. Albert says:

    In Version 10.9.4 this does nothing to enable tap to click in the magic mouse.

  8. Matt Viverette says:

    This does not work on OS X 10.9.3 Mavericks.

    • Christopher Cross says:

      Yes it does work on OS X 10.9.3 Mavericks, I am using it right now for enabling tap-to-click. You are probably entering the command wrong, be sure it’s on a single line and typed properly. You can use ‘defaults read’ to verify the command has been entered properly.

      • Lauri Hoefs says:

        I’m on 10.9.4, and don’t seem to be able to get this work either.

        All the defaults return 1 when I read them, so they are written correctly. But tap to click still only works for logged in users who have set it manually, not by default, and not in login screen.

        • Laura says:

          Nope, this does not work on Mavericks 10.9.5 either.

          “defaults read” displays that the setting is in there as:

          com.apple.mouse.tapBehavior” = 1;

          However, after reboot, there still is no tap behavior beyond what the options in System Preferences cover.

      • chris gerard says:

        sailing,, it takes me away… too where I want to be.

Leave a Reply


Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site