Triggers, conditions, loops and flow
The building blocks every routine uses: start on an event, check a condition, repeat, wait, branch and run steps side by side.
Triggers (5)
Run manually
Run manually is the trigger for routines you start yourself. It doesn't watch anything; it marks the routine as hand-started and can pin it to the tray menu for one-click access.
Started by another routine
Started by another routine is the trigger for helper routines. It shows that this routine is meant to be called by Run routine or Call routine, and lets it see which routine called it.
Routine event
Routine event starts a routine when something happens to another routine: it finished, it failed, or it sent a named event. It's how you chain routines and react to problems without editing the original.
When KeyRoutines starts
When KeyRoutines starts runs a routine as the app starts up. KeyRoutines starts when you sign in to Windows, so this is the trigger for anything you want ready every time you log on.
Webhook
Webhook starts a routine when a program on your PC calls its name through the KeyRoutines local API. It's for scripts, the Stream Deck plugin and other paired tools. The Webhook trigger needs KeyRoutines Pro.
Steps (13)
Stop repeating
Stop repeating ends the Repeat it's inside and carries on with whatever comes after it. Use it when you've found the item you were looking for or a check says there's no point going round again.
Comment
Comment is a note you drop between steps. It does nothing when the routine runs; it's there so you remember why a step exists or what a section of the routine is for.
Next round
Next round jumps straight to the next round of the Repeat it's in, skipping the steps left in this one. It's handy for passing over files, lines or items that don't need any work.
Delay
Delay pauses the routine for a time you choose before the next step runs. People add it after opening an app, between key presses, or anywhere a program needs a moment to react.
Finish routine
Finish routine ends the whole routine successfully on the spot and hands back the outputs you fill in. It's the way a small helper routine returns an answer to the routine that started it.
Stop routine
Stop routine ends the current run right there. You choose how it should be recorded and can add a short message, which makes the run history easy to read later.
Cancel routine
Cancel routine stops the runs of a routine you pick. It's useful as an emergency hotkey or to end a long job when something else takes priority.
Send routine event
Send routine event broadcasts a named signal from this routine. Other routines that listen with the Routine event trigger start when it's sent, so you can chain routines without them knowing about each other.
Run routine
Run routine starts another routine from inside the current one. You can hand it inputs, wait for it to finish and use its outputs, or just start it and keep going.
Turn routine on or off
Turn routine on or off enables or disables another routine. A disabled routine's triggers stop listening until it's turned back on, which is a neat way to pause automations for a while.
Remember
Remember keeps a value safe after the routine ends, even across restarts of KeyRoutines and the PC. Use it for things like the last volume you set, a folder you picked, or whether you're away.
Set variable
Set variable puts a value under a name so later steps can use it. By default it lasts for this run only, which makes it the usual way to keep a counter, a file path or a result to use further down.
Toggle
Toggle flips a remembered value between on and off. Paired with an If, it turns one hotkey into a two-way switch, like the free version of an AFK toggle.
Conditions (6)
Compare values
Compare values is the everyday yes-or-no check in KeyRoutines. You put a value on the left, pick a test, and put a value on the right, so an If can branch on things like a battery level, a window title or a number an earlier step worked out.
Expression is true
Expression is true is the power-user condition. Instead of filling in a form, you type a short expression, for example a counter of at least 3 and Visual Studio Code in front, and the routine treats the result as yes or no.
Remembered value is
Remembered value is reads a value saved by Remember or Toggle and answers a simple question about it. It's how a single hotkey knows whether to switch something on or put it back.
Routine is running
Routine is running checks whether a routine you pick has a run going right now. People use it to avoid starting a long job twice or to wait for one routine before another one changes the same things.
Step succeeded
Step succeeded looks back at a step earlier in the same routine and tells you if it worked. It's most useful after a step that's allowed to fail, so you can try a backup plan instead of stopping.
Started by trigger
Started by trigger checks which of a routine's own triggers began this run. That lets one routine react a little differently to a hotkey, a schedule or an app opening without keeping separate copies.
How-to guides
- How to mute your microphone with a hotkey on Windows 11
- How to change one app's volume with a hotkey on Windows
- How to lower music volume automatically during calls
- How to mute sound and pause music when you lock your PC
- How to mute Discord automatically when a Zoom or Teams call starts
- How to open apps at startup in a set window layout
- How to save and restore your window layout with a hotkey
- How to put windows back when you reconnect a monitor
- How to keep any window always on top with a hotkey
- How to close a recurring popup window automatically
Build this routine in KeyRoutines
Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.