But... can't you just set the 'lock timeout' to 10 seconds in the watch settings, and then the code above does exactly what you want?
I'm just thinking that if the watch was unlocked but it's still in zen mode, pressing the button would just go to the launcher. It all gets a bit more confusing
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, it can be done pretty easily.
But... can't you just set the 'lock timeout' to 10 seconds in the watch settings, and then the code above does exactly what you want?
I'm just thinking that if the watch was unlocked but it's still in zen mode, pressing the button would just go to the launcher. It all gets a bit more confusing