Feature Request to Add Key Sequences as a Trigger for Macros

Recently BetterTouchTool app released a really cool feature where now one can map actions not just to a hotkey but to a key sequence. It looks likes this:

and here is how you can create these sequences

Also this post has a bit more detail.

This opens so much freedom, it's really incredible. However using these sequences, I am tied to better touch toll builtin functions and running shell scripts. It would be incredible if I could run keyboard maestro macros from bettertouchtool using this new feature and if that is not possible I would really wish that Keyboard Maestro too would support such a change. Perhaps some people here are also using BetterTouchTool and know what I mean but it really is such an amazing feature especially since you can set intervals between the keypresses.

I hope you consider adding this as I really think it would be incredibly useful. Thank you.

I assume this program works in a way that when you press, say Ctrl,Ctrl, the program responds by doing something, and one of those things would be to type a keystroke, right? What happens if you have it type a keystroke that's a hotkey trigger for a KM macro?

Let's say you have a KM macro whose trigger is F15. You set up your program so that, when Ctrl,Ctrl is typed, it "presses" F15. That should launch your KM macro.

Give it a shot.

Yes, of course I could that but I will soon run out of things to map my key sequences too. It would be really nice to map key sequences not to some hotkey but to the action itself.

Don't get me wrong - I'm not saying your request isn't worthwhile. I'm just offering some alternatives until if and when this gets implemented.

With that said, I question your assertion that you would soon run out of things to map your key sequences to. For example:


I don't know the math, but I'm guessing that gives you at least 20 hotkeys, and probably more. And that's just one key.

Thank you Dan, you are right. I guess then the only concern is just making it a better experience of setting these sequences within keyboard maestro itself rather than another tool like bettertouchtool. I will experiment with that for now but I do think this idea can have some really nice benefits with some cool possibilities.

Sorry if I came across as not thinking it was a good idea. I guess in retrospect that’s probably the way my response read. But it’s not what I meant!


Hey Nikita,

Peter is not super keen on doing sequence-triggers, but if enough people as for the feature you never know.

BetterTouchTool supports AppleScript, so you can run as many Keyboard Maestro macros as you want.

tell application "Keyboard Maestro Engine"
   # Using the UUID
   do script "B39BA99A-3E68-4F77-AAFA-467D99A70D9A"
   # Using the macro name
   do script "Generic-Test 01"
end tell



RE: Feature Request to add key sequences as a trigger for macros

How is what you want different from the KM "Typed String Trigger"?

The Typed String trigger lets you execute a macro in response to a sequence of keys.

Typed String triggers allow you to use more verbose (and hence descriptive) sequences of keys to trigger a macro. Because the keys first go through to the current application, the keys are usually deleted prior to executing the macro, although with this disabled you can use it in an application that largely ignores keys. Triggers can include non-ASCII characters, but you should verify that the deletes work appropriately in these cases.

Keyboard Maestro has a bunch of ways you can create a multi-sequence trigger as described at:


All of them make it clear that the first keystroke will be swallowed regardless of matching the second, which a generic “multi-sequence trigger” makes very obscure. If an application does not behave this way, and attempts to swallow the first keystroke and then unswallow it if the second does not follow, bad things will inevitably happen.

Use the first keystroke as the trigger for all of your set of macros that would be triggered by a key sequence, and Keyboard Maestro will create the sequence for you.

I can almost grasp what you're saying here, but not quite. Can you give an example? Thanks.

If your key sequences all start with Option-, then in Keyboard Maestro just given them all the Option-, hot key.

Given a trigger like Option-, Option-, (as shown in @nikivi’s post), what does BTT do if you type Option-, x?

Keyboard Maestro can trigger on double tapping a hot key, but it will always swallow the hot key (even the first press). If some other behaviour is desired or implemented, then there will inevitably be problems (once you try to put keys back into the keyboard event queue, you will end up with out of sequence keystrokes).

This is hard to word, but that's holding down the option key while pressing the minus key, right?

And if they all have the same hot key, won't that bring up the Conflict Palette?

It was Option-comma (as far as I can see from the OP’s image).

Yes, exactly. Hence you get a multi-keystroke trigger with none of the down sides.

So he would type "Option+," (or whatever), then a letter or letters until the conflict palette is unique - which follows the rules you mentioned in this post:

Thant's pretty cool. I like it! I use a ShittlePro V2, and I often have it trigger KM macros. This will be a good way to to set up the triggers so I don't have to go hunting around for keyboard shortcuts that, say Final Cut Pro X doesn't already use for something else.

Awesome! Thanks!

1 Like

Right. And the advantage is multi-fold - because the palette shows up, you don’t have to memorise all of them. But because you can type the conflict resolution keys (which would only change if you changed your macros), you can memorise the ones you use frequently.

1 Like