idle
Returns how many seconds the Mac has gone without keyboard or mouse input.
Keyboard Maestro: IDLE
Details #
idle() takes no arguments and returns the number of seconds, with fractions, since the last keyboard, mouse or trackpad event.
Parameters #
Takes 0 arguments.
{{ idle() }}
Examples #
idle()→
0idle() > 300→
falseGotchas #
Only keyboard, mouse and trackpad activity counts. Playing a video or running a download does not reset it.
Calling it with any argument is an error:
idle() takes 0 arguments, got 1.When no real Mac is behind it (tests, previews) or the Mac can't answer, it returns 0.