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.

  • This worked for me on macOS Catalina. It required a log out+in to take effect. The weird thing is that the UI in the accessibility preferences was not updated to reflect the changes.
    – Olshansky
    Oct 4, 2020 at 21:01

2 Answers 2


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, 2014 at 9:33
  • On El Capitan, the original code (from the question) is working now.. Maybe Apple switched drivers
    – Nir Golan
    Nov 12, 2015 at 8:50
  • What about Sierra
    – Lipis
    Oct 2, 2016 at 19:05

This worked on macOS Monterey along with a logout/login cycle:

defaults write com.apple.AppleMultitouchTrackpad DragLock -bool false
defaults write com.apple.AppleMultitouchTrackpad Dragging -bool false
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true

You must log in to answer this question.

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