Gestures on TrackPad or Magic Mouse

Are gestures off my Trackpad or MagicMouse able to be utilized by KM?

Not directly, but I use BetterTouchTool to trigger KM macros.

Yeah, I use that as well, just was not sure if there was a direct way. But I guess that answers that. Thanks Philippe.

Hey Philippe,

OK, now that I figure there is no direct way…

How exactly do you execute a KM macro from BetterTouchTool. I have used BTT off and on for several years, so have some experience with it.


Most of the time I use “Execute Terminal Command”, with something like that:

osascript -e 'tell application "Keyboard Maestro Engine" to do script "98F5798E-2955-4F1D-BF91-AC43CA6F5258"'

You can get the macro’s UID from the menu item Edit > Copy as > Copy UID. Just be careful with the quotes.

You can also have BTT execute a “Custom Keyboard Shortcut” to trigger a KM macro by its hot key.

Ok great - many thanks.

EDIT - yeah this in fact works perfectly. Thanks again for guiding me through this, I think this will be very useful.

Cool! And you’re welcome.

Oh wow.

Many thanks for this - ended here looking for a way to trigger a KM macro from BBT, as opposed to using Alfred (which required a string being typed). Was getting despondent, thinking this was going to be tricky!

Instead, such a simple(?) yet elegant solution!

Love Alfred - but increasingly, BTT is stepping into the trigger action, with KM dealing with the backend.

@peternlewis I do not know if it is technically possible for Keyboard Maestro to make a difference between the mouse and the trackpad, but, all I can say is before finding this thread I thought I was able to trigger a macro using a gesture from my trackpad ("trackpad gesture") as I could practice them in the application (using "Practice Gestures"). I tried many times. Never got it triggering a macro :grinning:

At least, if this is not possible to trigger a macro that way ("trackpad gesture"), don't you think it would be great to indicate it in the Keyboard Maestro wiki?

Or, maybe, I just made the mistake to confuse "mouse" with "trackpad" here.

Edit: Just launched a macro via a Keyboard gesture. Not sure what to think now whether it is possible or not to launch a macro from a keyboard shortcut... :thinking: Time will tell if it is working all the time.

Another way to go:


I suspect it's more efficient than spinning up a sub-shell for osascript

bettertouchtool can run AS directly. Are there advantages triggering thru terminal command?