How to run an action after a hotkey followed by typed string

My question is similar to how-to-run-an-action-or-a-different-macro-based-on-which-key-is-pressed but not quite or I didn't understand the solution correctly.

I want to press ^Space as a hotkey, release those keys, then press and release 'f', then press and release 'o'. This should cause some action to run. I want to setup multiple macros that work with different characters being pressed. This seems possible with KM but I am not skilled enough yet.


Here's an untested idea you can try:

  1. Setup a separate macro for the Actions you want to run triggered by a typed string

    • At the end of each Macro insert an Action to Disable Macro Group that it is in.
  2. Put all of these macros in a Macro Group that is disabled.

  3. Setup a controlling Macro triggered by your hotkey, and have an Action that ENABLES the above Macro Group.


It sounds to me like you should avail yourself of the conflict palette and just give all the macros the ⌃Space and then let Keyboard Maestro display the conflict palette and then you can select among them using other keystrokes.

These suggestions are fantastic! There are so many neat things I can do.

The conflict palette route might be better because using the "typed string trigger" has the problem of deleting the types characters afterwards. The simulated delete presses were deleting selected objects in my app because I didn't have a text bar selected. I have some experimenting to do but this really gets me on the right track.

Actually it a feature not a problem since the Typed String trigger is intended to be used only in a text field or document. As the wiki article states:

WARNING: You should generally not use a Typed String trigger that simulates deletes in a non-text typing context, as the simulated delete keystrokes could be destructive.

When we type the typed string trigger in a text document, we of course want it to be replaced with the text snippet provided by the macro.

This is a good lesson for everyone to learn. :smile: