hi,
although my ultimate aim will be to use only 1 swipe to popup a menu to control "back to clock, back to launcher, back 1 step" etc,
currently my fastest shortcut will be to use "swip back" using swipe left to right,
with "swipe back to clock" <-- if this could be modified to use swipe up to down. currently "swip back to clock" is hard coded to use swipe Lt to Rt so these 2 app cant be used the same time.
I found this reference on event Bangle.swipe manual
with help from GPT4,
it seems for the "swipe back to clock"'s boot.js,
for this part:
let swipeHandler = (dir) => {
let currentFile = global.__FILE__||"default";
log("swipe:" + dir + " on app: " + currentFile);
if (!inhibit && dir === 1 && !Bangle.CLOCK) {
log("on a not clock app " + currentFile);
if ((settings.mode === 1 && settings.whiteList.includes(currentFile)) || // "White List"
(settings.mode === 2 && !settings.blackList.includes(currentFile)) || // "Black List"
settings.mode === 3) { // "Always"
log("load clock");
Bangle.showClock();
}
}
inhibit = false;
};
Bangle.on("swipe", swipeHandler);
}
I simply change it into
let swipeHandler = ( _ , dir) => {
will do the trick?
if it works, i would like to call it "swipe back to clock UD", later i would like to add the menu function to it, may be call it "swip back to clcok SM" S for selecting swipe U/D/L/R, M for menu.
But the SM version will be a long way to go. Currently should I keep the UD version for my own and not publishing to the bangle store? however i think it do will help as it now let people can use gesture to switch back to clcok by swipe U2D and use "swipe back" Lt to Rt together.
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.
hi,
although my ultimate aim will be to use only 1 swipe to popup a menu to control "back to clock, back to launcher, back 1 step" etc,
currently my fastest shortcut will be to use "swip back" using swipe left to right,
with "swipe back to clock" <-- if this could be modified to use swipe up to down. currently "swip back to clock" is hard coded to use swipe Lt to Rt so these 2 app cant be used the same time.
I found this reference on event Bangle.swipe
manual
with help from GPT4,
it seems for the "swipe back to clock"'s boot.js,
for this part:
I simply change it into
let swipeHandler = ( _ , dir) => {
will do the trick?
But the SM version will be a long way to go. Currently should I keep the UD version for my own and not publishing to the bangle store? however i think it do will help as it now let people can use gesture to switch back to clcok by swipe U2D and use "swipe back" Lt to Rt together.
thanks