Useful macOS defaults: Trackpad
Trackpad settings live in two domains. You often need to set both for a change to stick:
com.apple.driver.AppleBluetoothMultitouch.trackpad(for the Bluetooth Magic Trackpad)com.apple.AppleMultitouchTrackpad(for the built-in trackpad on MacBooks)
Some settings also live in NSGlobalDomain.
After changing these, log out and back in for them to take full effect.
Tap to click
Let a light tap act as a click, instead of pressing the trackpad down:
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
defaults write com.apple.AppleMultitouchTrackpad Clicking -bool trueAlso set it at the system level (needed for the login screen):
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1Secondary click (right click)
Set two-finger tap or click to act as a right click:
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadRightClick -bool trueYou can also right click by clicking the bottom right corner:
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.AppleMultitouchTrackpad TrackpadCornerSecondaryClick -int 2Values for corner click:
0= off1= bottom left2= bottom right
Tracking speed
Set how fast the cursor moves relative to your finger. The range is 0 (slowest) to 3 (fastest). The default is about 1:
defaults write NSGlobalDomain com.apple.trackpad.scaling -float 2.0Scroll direction
Set whether scrolling follows your finger ("natural") or goes the other way:
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool trueSet to true for natural scrolling (content follows your fingers). Set to false for the older direction. This also affects the mouse scroll wheel.
Three-finger drag
Move windows by dragging three fingers across the trackpad. This is hidden in the Accessibility settings:
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool trueYou also need to turn it on in the Accessibility framework:
defaults write com.apple.AppleMultitouchTrackpad Dragging -bool trueIn System Settings, this lives under Accessibility, then Pointer Control, then Trackpad Options, then Dragging style.
Swipe between pages
Swipe with two fingers to go back and forward in Safari and other apps:
defaults write NSGlobalDomain AppleEnableSwipeNavigateWithScrolls -bool trueThree-finger swipe between Spaces
Use three fingers to swipe between desktops:
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerHorizSwipeGesture -int 2
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerHorizSwipeGesture -int 2Values:
0= off1= swipe between pages2= swipe between Spaces
Pinch to zoom
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadPinch -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadPinch -bool trueSmart zoom (double-tap with two fingers)
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadTwoFingerDoubleTapGesture -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadTwoFingerDoubleTapGesture -bool trueRotate with two fingers
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRotate -bool true
defaults write com.apple.AppleMultitouchTrackpad TrackpadRotate -bool trueForce click and haptic feedback
On trackpads that support Force Touch, turn on force click (press harder for Quick Look and other features):
defaults write com.apple.AppleMultitouchTrackpad ForceSuppressed -bool false
defaults write com.apple.AppleMultitouchTrackpad ActuateDetents -int 1Set ForceSuppressed to true to turn off force click.
Haptic feedback strength
Set how strong the click feels on Force Touch trackpads:
defaults write com.apple.AppleMultitouchTrackpad FirstClickThreshold -int 1
defaults write com.apple.AppleMultitouchTrackpad SecondClickThreshold -int 1Values:
0= light1= medium2= firm
Silent clicking
On Force Touch trackpads, turn off the click sound:
defaults write com.apple.AppleMultitouchTrackpad ActuationStrength -int 0Set to 1 for normal click feedback.
Read all current trackpad settings
defaults read com.apple.driver.AppleBluetoothMultitouch.trackpad
defaults read com.apple.AppleMultitouchTrackpadNotes
You need to set both domains because macOS reads from different ones depending on whether you use the built-in trackpad or an external Magic Trackpad. If a setting does not seem to take effect, make sure you set it in both places.
Some trackpad settings also need NSGlobalDomain to be set (like tap to click and tracking speed). When in doubt, check all three:
defaults read NSGlobalDomain | grep -i trackpad
defaults read NSGlobalDomain | grep -i mouse
defaults read NSGlobalDomain | grep -i scrollEnjoyed this post?
Well, you could share the post with others, follow me with RSS Feeds and/or send me a comment via email.
Tags
Category:
Tags:
Year: