KeyRoutines
SystemWorks on Free

How to make an AFK hotkey that mutes and hides your screen

KeyRoutines' free AFK mode template uses one Hotkey trigger and an If on Remembered value is. Going away, it runs Remember layout, Mute or unmute, Show desktop and Show or hide desktop icons; coming back, Restore layout puts your windows back, the sound returns and the icons show again.

Steps

  1. 1

    Add the template

    Add AFK mode; it runs on Ctrl+Alt+K.

  2. 2

    Away or back?

    An If with Remembered value is checks whether you're marked as away.

  3. 3

    Going away

    Remember layout saves your windows, Mute or unmute mutes the sound, Show desktop clears the screen and Show or hide desktop icons hides the icons. Remember marks you as away.

  4. 4

    Coming back

    Mute or unmute brings the sound back, Restore layout returns your windows, and Desktop icons are showing (checked before you left) decides whether the icons come back.

Tips

  • Add Lock the PC at the end of the going-away branch if you also want the PC locked.
  • With Pro you can build the same thing as a Mode, which works out what to put back by itself.

Questions

Is this an anti-AFK tool for games?
No. It changes your own desktop while you step away. KeyRoutines never sends input to games.
What if I restart while away?
The away flag is remembered, so the next press brings things back.

Blocks this routine uses

Trigger · HotkeysFree

Hotkey

Hotkey starts a routine when you press a keyboard shortcut or mouse button. It's the most common way to run a routine, from a single app launcher key to a whole streaming setup on one combination.

Condition · Flow and routinesFree

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.

Step · Flow and routinesFree

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.

Step · WindowsFree

Remember layout

Remember layout takes a snapshot of where your windows are right now. A later Restore layout step can put them back exactly, which makes it easy to rearrange things temporarily.

Step · AudioFree

Mute or unmute

Mute or unmute silences or restores the master output, the default microphone, an app or one specific device. It is the go-to block for a system-wide mic mute key or for silencing the PC at night.

Step · WindowsFree

Show desktop

Show desktop minimizes every window except those of the apps you choose. Unlike Windows' own Show desktop, it can keep your important apps visible, work on one monitor only, and put everything back afterwards.

Step · DisplayFree

Show or hide desktop icons

Show or hide desktop icons does the same as right-clicking the desktop and choosing View ▸ Show desktop icons. People use it before streaming, recording or presenting so the desktop looks clean.

Condition · DisplayFree

Desktop icons are showing

Desktop icons are showing is a condition that answers whether the icons on your desktop are visible or hidden. It is useful when one routine should behave differently depending on how your desktop looks right now.

Step · WindowsFree

Restore layout

Restore layout moves windows back to a layout remembered earlier in the run, or arranges a named layout from your Layouts library. It's how a routine undoes its own changes, or brings back a saved workspace.

More how-to guides

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.