6

I'm trying to write a shell script that will automatically set the trackpad to use the three-finger-drag option that you can find in the system preferences. I've tried a number of different things, but none of them seem to work. Here's what I've got right now:

defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true

I've scoured all the settings I could find from the output of defaults read, but I've found nothing else useful. These are the settings that system-prefs changes when I manually change the settings. Is this a bug?

I'm running Mavericks on a 13-inch mid 2012 MacBook Air. The three-finger-drag works fine when I enable it manually.

EDIT: I restart my machine each time I run this.

4

It took a lot of trial and error, but I figured it out:

 defaults -currentHost write NSGlobalDomain com.apple.trackpad.threeFingerSwipeGesture -int 1

You don't need to restart your machine after you enter this command for the setting to apply. Logging out of your account and logging back in again is sufficient.

  • It doesn't work on Yosemite! – Khashayar Dec 8 '14 at 9:33
  • On El Capitan, the original code (from the question) is working now.. Maybe Apple switched drivers – Nir Golan Nov 12 '15 at 8:50
  • What about Sierra – Lipis Oct 2 '16 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .