Switch command+click and command+shift+click in chrome?

Is there a way I can switch the functionality of command+click (open link in new tab) and command+shift+click (open link in new tab and switch to it) in chrome? I use the latter much more and I'd prefer to have it has just command+click, but being relatively new to KM, I'm not sure where to start. Thanks!

Before I talk about KM, let me mention something else that may help you.

Google Chrome has "extensions" that you can add to do a variety of things to Chrome. One of those extensions is called Shortcut Manager. There is a wide variety of things you can do with this. I'm not sure if it will help you with that problem. There are some things it won't let you do, I've read, for security reasons, but I have no idea what those reasons are.

Now for some more problematic and interesting approaches.

With regard to KM and mouse control.... KM can work with some mouse buttons, when they act as USB devices, but I can't seem to make it work with the primary mouse buttons. HOWEVER I faced this problem in a different scenario and I solved it! I hate to even tell you how I solved it because it's one of the top ten programming tricks I've ever done, but you can get my solution for free here. What I did was used the software that came with the mouse (obviously not all mice come with software, but the ones with extra buttons always do) and you can change the primary mouse buttons to anything you want. If you change them to some unusual USB signal, (eg, Mouse button #8) then KM will be able to detect it. But there's a catch, because you then have to write a KM macro that converts the mouse's USB signal to a regular mouse click before you can use the primary mouse button again. At which time you can resolve your issue also.

P.S. When I try to redefine the primary button on a mouse, I get a warning that says "WARNING: if you redefine the primary mouse button, your mouse may become useless." That's true. There are two ways to fix that. Here's one way: have a different mouse button already set up as your primary button. It feels crazy having to use a different button as your primary mouse button, but it's only temporary as you get your KM code working.

I have no idea if any of this makes sense to you, or if you want to go to that much work.

1 Like

Thanks for the info. I've tried using the chrome extension you mentioned but it didn't seem to have the functionality I needed. As for the mouse, I'm using the default trackpad on my macbook pro so I'm not sure if what you mentioned will work.

Oh, the trackpad. I don't have an integrated tracked, but I think I have an external one. I'll turn it on and see what it can do. As you know, my advice was assuming you had a mouse.

I'm not one of the wizards here, but my conclusion is that both the trackpad tap action and mouse primary buttons are uncatchable by KM. I'd be thrilled if I was wrong.

But rarely is a problem unsolvable. I googled it and found a clue that a free and popular program called BetterTouchTool might help you. I've seen people on these forums rave about it. I see it's in my Application folder but it has a 45 day free trial and my trial has expired so I can't test it.

Basically, no, Keyboard Maestro cannot affect clicks. It can detect them, but not affect them.

Thanks, Peter. But using my trick of remapping the mouse buttons (internally on the mouse) using mouse control software I was able to map the primary buttons to other USB codes which KM was able to detect. And using that method I was able to redefine what the primary mouse buttons did using KM macros. But to be honest, it felt a little laggy when I did that. Not a lot, but a little.

@peternlewis (Sorry to revive an old topic, but figured this is the best place)

I'm trying to accomplish this also. I figured if I can detect the Command-Click as a trigger, then I could just use that to pause for a second, then use an action to switch to the next tab.

I'm trying to get Command-Click to work as a trigger using the USB Device Key trigger but with no luck. I'm wanting to detect a Command-Click on my Apple Magic Trackpad. When I add the USB Device Key trigger to the macro, I initially see this:
After I click where it says "click", I see this:
After setting this up, it does not seem to register in Chrome.

Any hints here? What am I doing wrong, or is this not possible.

The USB Device Key trigger can detect most USB device buttons, including keyboard, mice, sometimes other devices like monitors and scanners.

But it depends entirely on how the device is implemented, looking at low level USB events for events where a value goes turns on a single bit and then turns it back to zero when you press and release the button.

It is possible your mouse is not doing that, instead sending multiple events, or changing multiple events.

1 Like