Fix mousemove getting stuck.

pull/3115/head
7kasper 2023-11-29 00:18:59 +01:00
parent 1c160d7737
commit 5a400480e0
No known key found for this signature in database
GPG Key ID: 4AD2FD3E13BFB86A
3 changed files with 8 additions and 3 deletions

View File

@ -8,3 +8,4 @@
0.08: Presentation parts!
0.09: Code cleanup and windows 11 support.
0.10: Bugfixes.
0.11: Fix mouse move getting stuck.

View File

@ -264,7 +264,7 @@ Bangle.on('lock', function(on) {
});
function startHolding() {
bt.tapKey(bt.KEY.F10);
bt.tapKey(0, bt.MODIFY.CTRL, () => bt.tapKey(0, bt.MODIFY.CTRL));
holding = true;
Bangle.buzz();
E.showMessage('Holding');
@ -274,7 +274,8 @@ function startHolding() {
function stopHolding() {
clearTimeout(timeoutHolding);
if (holding) {
bt.tapKey(bt.KEY.F10);
bt.tapKey(0, bt.MODIFY.CTRL);
// bt.tapKey(bt.KEY.F10);
homePitch = 0;
homeRoll = 0;
holding = false;
@ -319,11 +320,13 @@ Bangle.on('drag', function(e) {
if (getTime() - cttl < 0.2) {
bt.clickButton(bt.BUTTON.LEFT);
console.log("click left");
clearToSend = true;
}
// longer press in center
else if (getTime() - cttl < 0.6 && e.x > g.getWidth()/4 && e.x < 3 * g.getWidth()/4 && e.y > g.getHeight() / 4 && e.y < 3 * g.getHeight() / 4) {
bt.clickButton(bt.BUTTON.RIGHT);
console.log("click right");
clearToSend = true;
}
cttl = 0;
lastx = 0;
@ -385,5 +388,6 @@ function onBtn() {
}
setWatch(onBtn, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat: true});
// Start App
loadSettings();
drawMain();

View File

@ -1,7 +1,7 @@
{
"id": "presentor",
"name": "Presentor",
"version": "0.10",
"version": "0.11",
"description": "Use your Bangle to present!",
"icon": "app.png",
"type": "app",