How to "middle-click" on new macbooks

36

8

I have recently switched to Mac, and the only thing I miss from my old notebook is the ability to middle-mousebutton-click by clicking both mousebuttons simultaneously.

This is a crucial feature when browsing the net as it opens links in a background tab. The best solution I have found by now is holding down Command-Shift and clicking, but this is often a bit hard to do (yeah, I surf on the couch (hey, it's a LAPtop after all) and often sit in strange positions)

Any tips on how to do this on the otherwise lovely and adorable trackpad?

Espen Herseth Halvorsen

Posted 2009-07-26T22:03:42.887

Reputation: 793

2

Wrong, it's a notebook, not a laptop ;-) "Do not leave the bottom of your MacBook Pro in contact with your lap or any surface of your body for extended periods. Prolonged contact with your body could cause discomfort and potentially a burn." according to the official user's guide at http://manuals.info.apple.com/en/macbook_pro_users_guide.pdf

– Arjan – 2010-02-17T22:14:22.237

Answers

19

Check out BetterTouchTool. It adds gestures to your trackpad or Magic Mouse and there's tons of gestures available to set actions to. Best of all, it's free!

Kevin Yap

Posted 2009-07-26T22:03:42.887

Reputation: 981

3BetterTouchTool is not free anymore. – sdive – 2016-06-03T08:29:48.417

This doesn't seem to work on Leopard. Any other ideas? – dreeves – 2010-06-16T02:01:33.333

1

MagicPrefs apparently works on Leopard and does the same thing (BetterTouchTool just has more options); try that. http://magicprefs.com/

– Kevin Yap – 2010-06-16T02:51:22.780

Awesome! Lowest license after 45 days trial is 4,49 €. MagicPrefs goes straight to the trash can. It didn't recognize my new Magic Trackpad so I searched for an alternative. – Martin – 2017-08-05T11:32:03.767

Changed the selected answer on this one due to the awesomeness of this program! – Espen Herseth Halvorsen – 2009-12-28T01:19:30.500

7

I don't believe its configurable within the OS, but MiddleClick, gives you a 3-tap middle click. Works really well in Firefox, which is what it was originally designed for. You'll need to tweak it so it fires up on logon.

Pauk

Posted 2009-07-26T22:03:42.887

Reputation: 924

1

Wow, great. Aaaaalmost what I need. The problem is that this simulates a command-click, what I want is a command-shift-click (to open in a BACKGROUND tab, not just a new tab).. I found the source code here: http://www.r0ssar00.com/2008/12/middle-click-on-mac-code.html ... Could anyone out there pleeease add a few lines and compile it so it command-shift-clicks? That would be awesome =)

– Espen Herseth Halvorsen – 2009-07-26T23:59:34.933

It is triggered by a three finger tap, not a click. This is a shame as it make accidental triggering possible. – RobM – 2017-11-18T12:11:10.903

This has now been improved, so it actually performs a middle-click. Works awesome :) – Espen Herseth Halvorsen – 2009-10-18T18:50:24.290

3

If you use Firefox, Command-Click will open in a new tab.

Or you can hold two fingers on the trackpad and click; this gives you a right-click. You could then select 'open in new tab' from the context menu. (or get an extension like Tab Mix Plus and make right-click open a new tab)

John Fouhy

Posted 2009-07-26T22:03:42.887

Reputation: 2 995

3

what I want is a command-shift-click [...] I found the source code here: http://www.r0ssar00.com/2008/12/middle-click-on-mac-code.html... Could anyone out there pleeease add a few lines and compile it so it command-shift-clicks?

I've fixed/modified the code to, I think, perform a Cmd+shift+click (if not, try other values for (CGKeyCode)56 - but 56 seems to be shift)

// click.m
//
// Compile with: 
// gcc -o click click.m -framework ApplicationServices -framework Foundation
//
// Usage:
// ./click
// Will cmd+shift+click mouse at current location.
//
// Based on http://www.r0ssar00.com/2008/12/middle-click-on-mac-code.html
// For http://superuser.com/questions/13351/how-to-middle-click-on-new-macbooks/13356#13356
// Modified by dbr - http://neverfear.org


#import <Foundation/Foundation.h>
#import <ApplicationServices/ApplicationServices.h>


int main(int argc, char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    NSUserDefaults *args = [NSUserDefaults standardUserDefaults];

    CGEventRef ourEvent = CGEventCreate(NULL);
    CGPoint ourLoc = CGEventGetLocation(ourEvent);

    CGPostKeyboardEvent((CGCharCode)0, (CGKeyCode)55, true); // Cmd
    CGPostKeyboardEvent((CGCharCode)0, (CGKeyCode)56, true); // Shift
    CGPostMouseEvent(ourLoc, 1, 1, 1);
    CGPostMouseEvent(ourLoc, 1, 1, 0);


    [pool release];
    return 0;
}

Combined with the technique mentioned in the link you mentioned (wrap the command in a Java app, and use MultiClutch), it should do it..

dbr

Posted 2009-07-26T22:03:42.887

Reputation: 4 987

How do you set up this in MultiClutch? There is no setting for three-button-clicks, just three-button-swipes.. – Espen Herseth Halvorsen – 2009-07-27T18:47:06.030

2

Jitouch allows you to set gestures, one of which is middle-click.

Jitouch preferences setting middle-click

Stephen Jennings

Posted 2009-07-26T22:03:42.887

Reputation: 21 788

0

Hopefully answering Zarg, I've found somewhere else in superuser about MultiClutch (which oddly wasn't cited in this question just yet). It seems like it started on early 2008, while BTT is from late 2009 and actually based on MultiClutch. I believe it can solve your issue, if you haven't found about it yet. I don't have any Leopard installed to actually try it.

cregox

Posted 2009-07-26T22:03:42.887

Reputation: 5 119

0

Addressing creating a new tab from a link (with Firefox and Safari, havent tried Opera) using your trackpad and mouse button: you can drag links to tabs to replace the content, or you can drop the link at the end of your tab row to create a new tab.

akf

Posted 2009-07-26T22:03:42.887

Reputation: 3 781

0

A decent amount has changed in the 10 years since this has been asked, but 3rd party apps are still required for an actual middle click capability with any Apple Trackpad (or the Magic Mouse). I have developed a couple newer apps to solve this problem (mind that they are not free).

Multitouch is an app for adding trackpad and Magic Mouse gestures to macOS, and middle clicking is one of the available actions that can be tied to a gesture.

Middle is a slimmer version of Multitouch, with the single purpose of adding middle click capability via a few select trackpad or Magic Mouse gestures.


In terms of free solutions, the mentioned open source MiddleClick app has been updated for Catalina in this fork: https://github.com/DaFuqtor/MiddleClick-Catalina.

My app, Middle, has a few key differences from MiddleClick-Catalina.

  • It has built in settings for launch at login and hiding the menu bar icon
  • It has a force touch gesture option for trackpad
  • It has a “one finger in the center” gesture option for Magic Mouse
  • Up and down parts of the click are synced with physical clicks instead of being executed after the up. This is important on CAD types of applications where you can pan using middle click.

I wrote Middle using Swift code from the mentioned Multitouch app. No code from MiddleClick-Catalina was used to build Middle.

Ryan H

Posted 2009-07-26T22:03:42.887

Reputation: 121