kbtouch: Compat w backswipe on newer firmwares

pull/2946/head
thyttan 2023-08-02 00:41:36 +02:00
parent 4061bd2f5e
commit 752dd852df
3 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,5 @@
0.01: New App!
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.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.

View File

@ -161,8 +161,11 @@ function draw() {
},back:()=>{
clearInterval(flashInterval);
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);
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.
});
};

View File

@ -1,6 +1,6 @@
{ "id": "kbtouch",
"name": "Touch keyboard",
"version":"0.03",
"version":"0.04",
"description": "A library for text input via onscreen keyboard",
"icon": "app.png",
"type":"textinput",