Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Does .osx trackpad right-click actually work? #48

Closed
necolas opened this Issue · 7 comments

3 participants

@necolas

Today I rebooted my Mac and ended up with the trackpad's bottom-right corner no longer mapped to right-click (for whatever reason). The .osx setting (see below) didn't seem to make any difference and I had to manually change the setting in System Prefs.

# 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

BTW, I'm using Snow Leopard.

@sjonnet19

It has worked for me in the past on Lion but I haven't used it for sometime.

@mathiasbynens

It might be a different setting in Snow Leopard. I’ll check it out on my girlfriend’s laptop and let you know.

@mathiasbynens

Hrm, these settings are changed when changing the settings in System Preferences, but it seems like there’s some other trigger (outside of .plist files), too.

@necolas: What does this tell you?

Disable the right-click in System Preferences and close the preference pane. Then:

cd /tmp
defaults read > a

Then, change the setting in System Preferences and close the preference pane.

defaults read > b
diff a b
@necolas

I get this:

<         TrackpadCornerSecondaryClick = 0;
---
>         TrackpadCornerSecondaryClick = 2;
@mathiasbynens

Assuming that’s in the com.apple.driver.AppleBluetoothMultitouch.trackpad domain, that’s one of the settings we’re writing to… Weird.

I’ve posted this as a question on Ask Different. Perhaps folks like @Lri can figure this one out.

@mathiasbynens

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. Before you reported this bug, I was only enabling the Magic Trackpad settings.

Now, I try to enable it everywhere:

# Enable tap to click on a Magic Trackpad
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
# Enable tap to click for the active user
defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Enable tap to click on the login screen
defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

The same goes for the right-click behavior. This is fixed in 91cd631. Thanks for the report, @necolas!

@necolas

Thanks Mathias, that's done the trick for the built-in Trackpad!

@ethzero ethzero referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@gamelinchpin gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles
@mathiasbynens .osx: Make Trackpad settings more robust
Fixes #48.
4a8ede5
@gamelinchpin gamelinchpin referenced this issue from a commit in gamelinchpin/dotfiles
@mathiasbynens .osx: Make Trackpad settings more robust
Fixes #48.
2f94394
@codonnell822 codonnell822 referenced this issue from a commit in codonnell822/dotfiles
@necolas necolas .osx: more robust trackpad right-click mapping
For more details see:
mathiasbynens/dotfiles#48
a82f2ea
@dmcass dmcass referenced this issue from a commit in dmcass/windows-dotfiles
@mathiasbynens .osx: Make Trackpad settings more robust
Fixes #48.
a00e986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.