How to set delay before macro gets executed?

triggers
palettes

#1

I'm a newbie here. Just bought the app last month or so.

I'm absolutely a fan of Keyboard Maestro's Typed String Trigger. I seldom use other triggers.

Suppose if I have two triggers like,
";sh"
";shutdown"
";shutdown30mins"

The ";sh" triggers the macro even before I type in ";shutdown" or any others that starts from ";sh..." . I usually love small trigger strings like ;sh ;ah so on as I'm a two-finger huntnpeck typer.

Although the palette kicks in when there is a conflict or entirely different tasks, it's not just feasible for small typed string triggers.

Are there any ways I can put some delay between the trigger and the execution of the macro? So that it allows me to complete what I'm supposed to type? Maybe a sec delay?


#2

No, it doesn’t work that way. As with all triggers, they happen when their requirements are completed and Keyboard Maestro cannot see the future to know what you might type later, and you generally do not want a lag on the trigger activation of macros. One a typed string trigger (or any trigger) is activated, it clears the Typed String trigger buffer.

The best solution with this sort of thing is to use a trailing character (as well as or instead of a leading character). So instead of “;sh”, use “;sh;”.


#3

Thanks Peter.

The trailing character is an elegant solution. How could I’ve not think of this trick earlier?

Thanks a ton.

Such a lovely community.

Cheers.