How to "middle-click" on new macbooks

60,689

Solution 1

Check out BetterTouchTool. It adds gestures to your trackpad or Magic Mouse and there's tons of gestures available to set actions to.

To add the functionality you're looking for choose »Trackpad« from the input dropdown and add »Three finger click« as trigger and »CMD+Click« as assigned action. Now clicking with three fingers will open it in a new tab.

Screenshot of Better Touch Tool with the action set up

For Safari you'll have to activate »⌘+click opens a link in a new tab«, before it works as intended.

Screenshot of new tab preference activated in Safari activated

ps. You can also set it to trigger with »Three finger tap«, but I can only get it to trigger consistently when I the »Force tab«, which I for one can't do consistently.

Solution 2

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.

Solution 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..

Solution 4

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)

Solution 5

Middle is a single-purpose app for adding the middle click to macOS for Magic Mouse and Apple trackpads. You can pick from a few gestures for each device, or hold the fn key and left click for a middle click. (I'm the developer, and the app is not free)

Middle app preferences

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. (I'm the developer, and the app is not free)

Share:
60,689

Related videos on Youtube

Espen Herseth Halvorsen
Author by

Espen Herseth Halvorsen

Just a regular Norwegian guy. Nothing more to see here, move on =)

Updated on September 17, 2022

Comments

  • Espen Herseth Halvorsen
    Espen Herseth Halvorsen over 1 year

    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
    Espen Herseth Halvorsen almost 15 years
    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: 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
    Espen Herseth Halvorsen almost 15 years
    How do you set up this in MultiClutch? There is no setting for three-button-clicks, just three-button-swipes..
  • Espen Herseth Halvorsen
    Espen Herseth Halvorsen over 14 years
    This has now been improved, so it actually performs a middle-click. Works awesome :)
  • Espen Herseth Halvorsen
    Espen Herseth Halvorsen over 14 years
    Changed the selected answer on this one due to the awesomeness of this program!
  • dreeves
    dreeves almost 14 years
    This doesn't seem to work on Leopard. Any other ideas?
  • Ching Chang Chung
    Ching Chang Chung almost 14 years
    MagicPrefs apparently works on Leopard and does the same thing (BetterTouchTool just has more options); try that. magicprefs.com
  • sdive
    sdive almost 8 years
    BetterTouchTool is not free anymore.
  • Martin
    Martin almost 7 years
    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.
  • RobM
    RobM over 6 years
    It is triggered by a three finger tap, not a click. This is a shame as it make accidental triggering possible.
  • HappyFace
    HappyFace about 3 years
    BetterTouchTool is very feature-rich, but also very energy inefficient.