Is there any way to get a list of listeners created by setWatch()?
setWatch()
I was thinking about creating a global listener, so it would be nice if it could do something like
setWatch(()=>{ // check only this function is listening if (getWatches(BTN1).length === 1) doCoolStuff(); }, BTN1);
And that would allow me to doCoolStuff by pressing BTN1 from e.g. most clocks, but without interfering with apps that actually use BTN1.
doCoolStuff
And I guess the same question for Bangle.on()? (Because I just realized it would be neat to swipe from the clock to settings/launcher)
Bangle.on()
@rigrig started
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.
Is there any way to get a list of listeners created by
setWatch()
?I was thinking about creating a global listener, so it would be nice if it could do something like
And that would allow me to
doCoolStuff
by pressing BTN1 from e.g. most clocks, but without interfering with apps that actually use BTN1.And I guess the same question for
Bangle.on()
? (Because I just realized it would be neat to swipe from the clock to settings/launcher)