KeyRoutines
StepFreesystem.lock

Lock your Windows 11 PC automatically with a routine

Lock the PC shows the lock screen, just like pressing Win+L. It's most useful when something else decides the moment, such as being idle, a time of day, or leaving your desk.

How it works

  • By default it locks at once.
  • In the advanced settings you can add a countdown with a Cancel button; cancelling leaves the PC unlocked and the step reports it.
  • Your apps keep running behind the lock screen.

Routines that use it

Lock when idle

When Idle fires after 5 minutes, Lock the PC so nobody can read your screen.

Leave-the-desk key

A hotkey pauses music with Media control, mutes with Mute or unmute and locks the PC.

Lunch break lock

An At a time routine at 12:30 runs Lock the PC with a 30-second countdown, so you can cancel if you are working through lunch.

Settings

SettingWhat it does
CountdownadvancedCount down first, with a Cancel button (0 = lock at once).

Questions

How do I lock my PC automatically when I walk away?
Use the Idle trigger with the time you want and a Lock the PC step. The lock happens once you've been away that long.
Can I get a warning before it locks?
Yes. Set a countdown in the step's advanced settings, and you'll see a notification with a Cancel button first.

Pairs well with

Build this routine in KeyRoutines

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