Browse the docs

Mac sleeps

Runs the macro as the Mac is about to go to sleep.

The Mac goes to sleep

Keyboard Maestro: Sleep

Details #

Fires once when the Mac is about to sleep (the workspace will-sleep notification). It takes no parameters. The Group scope still applies, checked against the app that is in front at the time, so an Everywhere Group is the usual choice.

{{triggerValue}} is empty.

Secure input does not affect this trigger.

The Mac sleeps right after the notification, so keep the macro short: long steps may not finish before the Mac is asleep.

Parameters #

This trigger takes no parameters.

Every trigger also takes Limits: a cooldown, the first time each day, every nth time, twice within seconds, a chance, only while you are at the Mac, on one Mac, or in a State. See Limits on any trigger.

Examples #

Sleep notice
When
  1. The Mac goes to sleep
Do
  1. Show a notification “Sleep trigger ran”
Open in Switchboard to try it

Gotchas #

  • Not fired reasons: disabled, groupOff, scope, paused, conditionFalse.

See also #

Mac wakes, Mac sleeps, Screen locks, Screen unlocks, Triggers