MacOS – Command Line for Enable Dragging

command linemacostrackpad

In MacOS, in the Accessibility widget (in System Preferences) if you scroll all the way down to 'Mouse & Trackpad', and then click on the 'Trackpad Options' button, there is a by-default-unchecked box for 'Enable Dragging'. This option is what allows you to "tap and drag" a window around using its titlebar.

I need to know the command line for checking that box. Can anyone help? Thanks!

Best Answer

The easy way to find the plist key for a given preference is to open a Finder window of ~/Library/Preferences, set it to List View, sorted by Date Modified.

Then, set the preference and see what file gets modified.

From that, I get two almost identical files modified (on 10.14.5):

com.apple.driver.AppleBluetoothMultitouch.trackpad.plist
com.apple.AppleMultitouchTrackpad.plist

They contain the following relevant keys:

<key>DragLock</key>
<false/>
<key>Dragging</key>
<false/>
<key>TrackpadThreeFingerDrag</key>
<false/>

so you can set these keys directly with defaults:

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

You can include three-finger dragging or Drag Lock, if that's what you want with similar commands.