Mouse right click on iMacs

pty10
New Contributor III

I have a lab of iMacs where mouse right click isn't enabled. When I go to system preferences I can see that both left and right side of the mouse are set to primary. Using composer, I created a DMG (using new and modified snapshot) option to get the HIDMouse plist.

When I deploy the DMG using Self service, I can see in system preferences that the right click of the mouse changes from primary to secondary but still not able to right click with the mouse. If I manually change it back to primary and then back to secondary, I can right click.

  1. If there's anything I'm missing here?
  2. Also, how can I deploy to dmg to all computers in the lab without using Self Service? Is it just a matter of turning off self service, set the scope to the smart group, set the trigger to every 15 and the frequency to ongoing?

Cheers,

Henry

1 ACCEPTED SOLUTION

Kumarasinghe
Valued Contributor

Ok.

Create 2 MCX entries.

1. Apple Mighty Mouse - Button2-Button2 as Secondary Button (Right-Click)

external image link
external image link

2. Apple Mighty Mouse - ButtonDominance-Button1 as Primary Button

external image link
external image link

Then it would look like this in your Managed Preferences list
external image link

View solution in original post

16 REPLIES 16

Kumarasinghe
Valued Contributor

Please try the MCX or scripted method posted in your previous thread.
https://jamfnation.jamfsoftware.com/discussion.html?id=7829

pty10
New Contributor III

I saw your post on the thread but it doesn't really explain how to achieve this. Do you mind expanding on how to do it?

Kumarasinghe
Valued Contributor

What type of Apple mouse you are talking about - Apple mighty mouse or magic mouse?
Have you done any Managed Preferences with your Casper setup?

pty10
New Contributor III

mighty mouse. We do a few MCX 's setup to do different things.

Kumarasinghe
Valued Contributor

Ok.

Create 2 MCX entries.

1. Apple Mighty Mouse - Button2-Button2 as Secondary Button (Right-Click)

external image link
external image link

2. Apple Mighty Mouse - ButtonDominance-Button1 as Primary Button

external image link
external image link

Then it would look like this in your Managed Preferences list
external image link

pty10
New Contributor III

Thanks for the info Kumarasinghe, worked beautiful. Followed your steps and issue resolved. Thanks heaps!

chris_kemp
Contributor III

My favorite pet peeve about Macs...

Glad you for it sorted.

taugust04
Valued Contributor

Has anyone gotten this working in a configuration profile instead of MCX in Yosemite? Uploading the com.apple.driver.AppleHIDMouse.plist file pre-configured into Casper and creating a Configuration Profile from it works for Mavericks clients but its on my "not working" list in Yosemite. In Yosemite, System Preferences shows the Secondary Button as being configured but it doesn't do anything. If I remove the profile, it reverts back to Primary, and then I can manually set it to Secondary, and then right-click works again as usual. Weird...

jaharmi
Contributor

@taugust04, I’ve also seen the same Yosemite behavior when setting the Button2 value via a “defaults write” command run as the user via a LaunchAgent. This previously worked with Mavericks, but does not work in Yosemite (10.10.2).

In Yosemite, if I change the setting manually in System Preferences, it does take effect.

rcorbin
Contributor II

Would be great if this could be done via a configuration profile. I think the MCX stuff is getting pretty much phased out of Yosemite.

rmanly
Contributor III

@rcorbin

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>PayloadContent</key>
    <array>
      <dict>
        <key>PayloadContent</key>
        <dict>
          <key>com.apple.driver.AppleHIDMouse</key>
          <dict>
            <key>Set-Once</key>
            <array>
              <dict>
                <key>mcx_preference_settings</key>
                <dict>
                  <key>Button1</key>
                  <integer>1</integer>
                  <key>Button2</key>
                  <integer>2</integer>
                </dict>
              </dict>
            </array>
          </dict>
        </dict>
        <key>PayloadEnabled</key>
        <true/>
        <key>PayloadIdentifier</key>
        <string>MCXToProfile.2df0c275-98a3-483d-9556-b44bb6aef558.alacarte.customsettings.2cc59d4d-302a-4a2c-ad8a-db588411ed6b</string>
        <key>PayloadType</key>
        <string>com.apple.ManagedClient.preferences</string>
        <key>PayloadUUID</key>
        <string>2cc59d4d-302a-4a2c-ad8a-db588411ed6b</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
      </dict>
    </array>
    <key>PayloadDescription</key>
    <string>Included custom settings:
      com.apple.driver.AppleHIDMouse

      Git revision: 1d30395cd4</string>
    <key>PayloadDisplayName</key>
    <string>MCXToProfile: com.apple.driver.AppleHIDMouse</string>
    <key>PayloadIdentifier</key>
    <string>org.foo.MouseRightClick</string>
    <key>PayloadOrganization</key>
    <string></string>
    <key>PayloadRemovalDisallowed</key>
    <true/>
    <key>PayloadScope</key>
    <string>System</string>
    <key>PayloadType</key>
    <string>Configuration</string>
    <key>PayloadUUID</key>
    <string>2df0c275-98a3-483d-9556-b44bb6aef558</string>
    <key>PayloadVersion</key>
    <integer>1</integer>
  </dict>
</plist>

michael_ferguso
New Contributor

@jaharmi @taugust04 @rmanly Did you guys ever get this working on Yosemite? Doesn't seem to work for me on 10.10.4. Do you push the profile, then set it manually, then it works?

Thanks!

rmanly
Contributor III

@michael.ferguson

I switched to using the AmsysUK public profile this year, it covers all input devices and that seems to be working.

I've only personally tested on machines with trackpads though.

I used the profile above with 10.9.x successfully. I did see the behavior some others are describing where it looks set in sys pref pane and it doesn't actually work but that was when the config. profile was set to forced and changing to Set-Once resolved that (If I am remembering correctly).

EDIT: can confirm that the Amsys profile works with mighty mice and magic mice.

Kumarasinghe
Valued Contributor

We use the scripted method now.

# Set Apple Mouse button 1 to Primary click and button 2 to Secondary click.
defaults write "/System/Library/User Template/Non_localized/Library/Preferences/com.apple.driver.AppleHIDMouse" Button1 -integer 1
defaults write "/System/Library/User Template/Non_localized/Library/Preferences/com.apple.driver.AppleHIDMouse" Button2 -integer 2
defaults write "/System/Library/User Template/Non_localized/Library/Preferences/com.apple.driver.AppleHIDMouse" Button3 -integer 3
defaults write "/System/Library/User Template/Non_localized/Library/Preferences/com.apple.driver.AppleHIDMouse" ButtonDominance -integer 1

Petrie
New Contributor

Has anyone got this working in Yosemite or El Capitan yet through profile manager?

I'm using Profile Manager not Jamf and i've tried several of the methods above by inputting the scripts and policies into the custom settings section of device groups but no luck yet as the layout and options are slightly different. Could it be that this only works as a setting for users and not devices?

It's such a shame that this isn't a standard managed setting as it seems like a really common issue.

blinvisible
Contributor

An updated method for working around the fact that config profiles don't fully/correctly apply the mouse button settings:

https://www.jamf.com/jamf-nation/discussions/25059/managing-mouse-button-behavior-in-modern-macos