Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I’m looking for a command (defaults write …) to enable right-click by tapping the bottom right Trackpad corner.

This can be enabled as follows: System PreferencesTrackpadPoint & Click → enable Secondary click and select “Click in bottom right corner”.

However, I’m looking for a way to do this programmatically.

More details

To find out which settings to modify using the defaults command, I usually do something like this…

  1. Disable the desired setting in System Preferences and close the preference pane.
  2. Then:

    cd /tmp
    defaults read > before
    
  3. Then, change the setting in System Preferences and close the preference pane. 4.

    defaults read > after
    diff before after
    

A long time ago (I think it was still on Snow Leopard) this brought up the following solution:

# Map bottom right Trackpad corner to right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

However, it seems like there’s more to it than just these two settings. I’ve tried disabling the setting in System Preferences, then running these commands, then logging out and back in again, but it had no effect.

share|improve this question
1  
Related: apple.stackexchange.com/q/48112/12285 –  timothymh Apr 10 '12 at 11:48
add comment

1 Answer 1

up vote 1 down vote accepted

I spent some more time debugging this, and it seems there are multiple setting locations (on multiple hosts) for the same setting.

AFAICT, each user gets his own host. The login screen uses a separate host. It makes sense to enable some settings (like Trackpad tap to click) for both these hosts.

Furthermore, OS X seems to have separate settings for Magic Trackpads and built-in MacBook Trackpads. The commands in my question only enable the Magic Trackpad settings.

Now, I try to enable it everywhere:

# Map bottom right Trackpad corner to right-click
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true
defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1
defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true
share|improve this answer
    
FTR, these commands (followed by a reboot) seemed to work fine on a clean OS X 10.8 Mountain Lion install. –  Mathias Bynens Jul 27 '12 at 10:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.