Is it possible to enable mouse right click via Terminal?

  • Wouldn't that kinda suck? You'd only be able to right click in the top right corner of the screen.
    – Alexander
    Jan 24, 2014 at 22:22
  • I mean enable right-click on mouse through Terminal. I used the word "corner" incorrectly. Sorry. Jan 24, 2014 at 22:35

5 Answers 5


Try defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton

To undo: defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode OneButton

  • 2
    No need to undo this beautiful thing :P Jan 25, 2014 at 1:02
  • I think I love you.
    – Ty.
    Jun 25, 2017 at 19:41
  • I think this alone isn't enough. It tells you to ENABLE secondary mouse click, but it doesn't tell you which side of the mouse activates it. I'm still trying to find out how to do it. Feb 5, 2019 at 6:09
  • @Sridhar-Sarnobat One google search later: superuser.com/a/506761/104806
    – Alexander
    Feb 5, 2019 at 18:06
  • Thanks, I just gave that a try. No luck. And I'm not sure if you're suggesting I'm too lazy/incompetent to search Google. Feb 6, 2019 at 4:23

This worked for me Restart required

defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton
defaults write com.apple.AppleMultitouchMouse.plist MouseButtonMode TwoButton

to revert change TwoButton to OneButton


Depends on mouse you are using too I believe, why not something like this if its the regular Apple mouse?

defaults write /Library/Preferences/com.apple.driver.AppleHIDMouse.plist Button2 -int 2


defaults write /Users/username/Library/Preferences/com.apple.driver.AppleHIDMouse.plist Button2 -int 2

If others search for how to perform a right click from a shell script, you can use MouseTools:

MouseTools -x 1000 -y 500;MouseTools -rightClick
  • This isn't what OP asked. From my understanding, he wan't a command line solution to activating the right click functionality on Mcs
    – Alexander
    Jan 26, 2014 at 16:55

You can enable it with BetterTouchTool.

  • 1
    Could you elaborate on your answer. Provide a step-by-step solution or a link to a resource that explains your answer better. This will also help to prevent users from marking your answer down. Jan 25, 2014 at 6:37
  • I know this tool. The problem I had was to enable it through command line so that I could put this into an executable bash file to use it in more than one machine easily. Jan 25, 2014 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .