How to create macro activated only after no key pressed

How to create a macro that gets stays triggered when app running but get runs only if no user input for specified time ?

One inefficient suggestion:

If “no user input” could be interpreted as “no alpha-numeric key pressed” you could have a macro that’s triggered whenever someone presses such a key (use the regular expression match and use a “.” as the trigger) that sets a variable to the current time.

You could refer back to this variable periodically from a second macro that’s launched when you application is started that repeatedly waits a few seconds then checks if the variable is older than the current time minus your specified time.

Search the forum for 'idle()'.


I have this same question; so, rather than starting a new thread, I thought I would bring it up again here.

Can someone suggest a method of triggering an application to launch (in this case Sugarsync) every night?

Launching an application: that’s easy

Yet there should be a pop-up dialogue box confirming whether or not to continue.

If the user clicks “cancel” then it does not launch

If there is no one at the machine and there is no response (no click) after 90 seconds then it launches the app.

Thanks for your support,

There is a ‘Periodic Trigger’, which is essentially the same as cron. Then you launch a dialogue asking if you want to run, and respond based on which button is pushed.

Thank you for the timely response!

Where is the Periodic Trigger found? Is it only in KM 7? I don’t have KM 7 yet.

I will try to figure it out. I guess I should add an action such as If all conditions met… and/or Prompt for user input?

Thanks for your support,

The periodic trigger has been around for a while. Start any new Macro, and click on the + button to add a Trigger. That should be it.

Hey @devananda,

Where all the triggers are.

You may also want to scope out the IDLE() function. See Peter's relevant post.


Thank you for the screenshot!

This trigger is not available in my version of KM (version 6).

But this screenshot is helpful.

There are a ton of updates, new features, and fixes in KM 7. I highly recommend it.

See Stairways Software releases Keyboard Maestro 7.0.

If it is the MacOSX that is holding you up, then I can also recommend both Yosemite and El Capitan. I did not have any issues when I upgraded to both (about 1 yr after release).

Good luck, and let us know how it goes.

The Periodic Trigger was called the While Logged In trigger in version 6.