mirror of https://github.com/espruino/BangleApps
kbtouch: Compat w backswipe on newer firmwares
parent
4061bd2f5e
commit
752dd852df
|
@ -1,3 +1,5 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: Introduced settings to customize the layout and functionality of the keyboard.
|
0.02: Introduced settings to customize the layout and functionality of the keyboard.
|
||||||
0.03: Convert Yes/No On/Off in settings to checkboxes
|
0.03: Convert Yes/No On/Off in settings to checkboxes
|
||||||
|
0.04: Catch and discard swipe events on fw2v19 and up (as well as some cutting
|
||||||
|
edge 2v18 ones), allowing compatability with the Back Swipe app.
|
||||||
|
|
|
@ -161,8 +161,11 @@ function draw() {
|
||||||
},back:()=>{
|
},back:()=>{
|
||||||
clearInterval(flashInterval);
|
clearInterval(flashInterval);
|
||||||
Bangle.setUI();
|
Bangle.setUI();
|
||||||
|
Bangle.prependListener&&Bangle.removeListener('swipe', catchSwipe); // Remove swipe lister if it was added with `Bangle.prependListener()` (fw2v19 and up).
|
||||||
g.clearRect(Bangle.appRect);
|
g.clearRect(Bangle.appRect);
|
||||||
resolve(text);
|
resolve(text);
|
||||||
}});
|
}});
|
||||||
|
let catchSwipe = ()=>{E.stopEventPropagation&&E.stopEventPropagation();};
|
||||||
|
Bangle.prependListener&&Bangle.prependListener('swipe', catchSwipe); // Intercept swipes on fw2v19 and later. Should not break on older firmwares.
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ "id": "kbtouch",
|
{ "id": "kbtouch",
|
||||||
"name": "Touch keyboard",
|
"name": "Touch keyboard",
|
||||||
"version":"0.03",
|
"version":"0.04",
|
||||||
"description": "A library for text input via onscreen keyboard",
|
"description": "A library for text input via onscreen keyboard",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type":"textinput",
|
"type":"textinput",
|
||||||
|
|
Loading…
Reference in New Issue