Trigger macro when mouse button + ctrl is pressed

triggers

#1

hi there,

i have a logitech mx master 2s mouse and i would like to trigger a km macro when pressing the back button of the mouse and the ctrl button on my keyboard at the same time. i was looking for a condition based triggering with usb device and hotkey as inputs… but didn't found anything. any ideas?

thanks for your help, johannes


#2

Hey Johannes,

Logitech devices are not a very good fit with Keyboard Maestro's USB Device Key trigger.

You can try, but don't count on it working.

On the other hand if you're using Logitech's device driver you might look and see if it can run an AppleScript or shell script in response to a button press.

-Chris


#3

thanks for your reply chris,
from what i can see in the logitech options, i can't trigger applescripts or the like. but i can assign the back button to a keystroke to trigger a macro in km. that works great.
what i dont get is the logical part – where i check if both device keys are pressed and if its true, trigger the macro. maybe i can check at the top of the macro if the condition is true and continue the macro if so, if not stop the macro.
is that possible in km and how do i do it?


#4

Chis, it depends on the Logitech device, and whether or not you are running the Logitech device driver.

I've had great success using KM with the Logitech TrackBall M570 since I am NOT running the Logitech driver.

image


#5

thanks. good to know. hope the mx master 2s behaves the same way…
but for my mouse the driver/ logitech option app is pretty important to set the scroll wheel response.
is there a workaround – without uninstall the driver but using the keystroke that the mouse generates?

and btw. are you triggering here via the normal left/right mouse buttons or the additional back/ forward buttons?


#6

Hey Johannes,

You can't do chords with Keyboard Maestro.

Does the Logitech driver software NOT support chords?

The only 3rd Party mouse drive I know off offhand that does is SteerMouse.

USB Overdrive is more powerful in some ways, but it doesn't do chords.

-Chris


#7

Ok. From what i can see in trigger options of km (and the screenshot that michael posted) on the bottom you can check "with these modifiers" that will do exactly the logic that i was looking for.


#8

Hey @Johannes,

Ah, so.

I misunderstood and thought you wanted to press mouse-button chords.

-Chris


#9

its a nice idea and good to know there are ways to do that...
thanks chris


#10

well, finally the simple solution for my problem is to set the hotkey trigger of my macro to ctrl+f16, while the back-key is set to the keystroke f16 in logitech options. thats it. great how simple that is…