Skip to main content

Is screen locked (device.is_screen_locked)

Declaration​

locked = device.is_screen_locked()

Returns​

  • locked
    Boolean. Whether the screen is locked

Description​

Check whether the screen is currently locked

Example​

if device.is_screen_locked() then
-- screen is locked
else
-- screen is unlocked
end