3

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 '14 at 22:22
  • I mean enable right-click on mouse through Terminal. I used the word "corner" incorrectly. Sorry. – Enrico P. Varella Jan 24 '14 at 22:35
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 – Enrico P. Varella Jan 25 '14 at 1:02
  • I think I love you. – Ty. Jun 25 '17 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. – Sridhar Sarnobat Feb 5 at 6:09
  • @Sridhar-Sarnobat One google search later: superuser.com/a/506761/104806 – Alexander Feb 5 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. – Sridhar Sarnobat Feb 6 at 4:23
2

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

Or

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

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 '14 at 16:55
0

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. – Danijel-James W Jan 25 '14 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. – Enrico P. Varella Jan 25 '14 at 15:27

You must log in to answer this question.

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