Trigger macro when mouse button + ctrl is pressed

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

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

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?

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

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?

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

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.

Hey @Johannes,

Ah, so.

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

-Chris

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

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…

Okay I think I am having a similar issue that you did regarding KM and logitech options not getting along very well. After installing KM I can no longer assign keystroke commands in logitech options. Would you mind explaining the workaround to a very rookie user of keyboard maestro!? Thanks!