Secondary Mouse Click 10.4.4

d_wilkins
New Contributor II

Has anyone noticed that as of 10.10.4, it is no longer possible to run the defaults write command to enable Secondary Mouse Click??

I have a login script that runs the command:

sudo -u $3 defaults write com.apple.driver.AppleHIDMouse Button2 -integer 2

This has worked on all OS X versions so far however not currently working on 10.10.4.

Its an interesting error as the Sys Prefs GUI displays that button 2 is set for Secondary Click but it is not working. If you go into Sys Prefs and manually change the option then put it back to Secondary Click, all is well however this is not an option when managing many hundreds of Mac's.

I would be very interested to hear if anyone else has discovered this and of course if someone has a fix?

1 ACCEPTED SOLUTION

jjones
Contributor II

Hmmm running it manually with this command below seems it works, but upon logging out/in, it does not set the right click. Seems Apple threw another change in the backgrounds possibly? (note to change this plist as yours is a desktop plist, mine is a laptop plist)

#!/bin/sh

sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick bool -true

Another way you may be able to do this is by enabling it in the default template, this would stop the need of having it run at each login unless you are wanting persistance.

defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

View solution in original post

6 REPLIES 6

jjones
Contributor II

Hmmm running it manually with this command below seems it works, but upon logging out/in, it does not set the right click. Seems Apple threw another change in the backgrounds possibly? (note to change this plist as yours is a desktop plist, mine is a laptop plist)

#!/bin/sh

sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick bool -true

Another way you may be able to do this is by enabling it in the default template, this would stop the need of having it run at each login unless you are wanting persistance.

defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

d_wilkins
New Contributor II

Thanks @jjones I hadn't thought of using the User Template this way and my initial testing has confirmed that this does in fact work.

Hopefully there are no other hidden nasties like this and that Apple will rectify this issue soon.

calumhunter
Valued Contributor

have you tried killing cfprefsd after running defaults at login?

jjones
Contributor II

@calumhunter

I tried killing it, and the defaults did not take place, before 10.10.4 i recall not having to kill this, looks like Apple may have changed something in the background.

calumhunter
Valued Contributor

Interesting, I just checked and i'm setting this as a first boot script so it gets set in the user template, explains why I wasn't seeing the issue.

If you login as the user, run the defaults command, log out and log back in or even reboot does the setting stick?

d_wilkins
New Contributor II

Its all actually a bit of hit and miss, which does make me think its a caching issue. If I manually run the defaults command Sys Prefs change but right click is not working. If I then log out and log back in it "sometimes" works?

An interesting scenario appeared in testing as well where I ran the defaults command logged out n back in and left click was set to secondary as well but reading as primary in Sys Prefs as well as in the plist file itself. After running killall cfprefsd all was well again!

There is obviously something strange going on here but I don't think its worth loosing sleep over LOL.

I think the fix is going to make the setting in the user templates and be done with it as that does seem to work every time...... so far!