Fired when the system changes to an active, idle or locked state. The event listener is passed a string that has one of three values:
- "locked" if the screen is locked or the screensaver activates
- "idle" if the system is unlocked and the user has not generated any input for a specified number of seconds. This number defaults to 60, but can be set using
idle.setDetectionInterval()
. - "active" when the user generates input on an idle system.