mirror of https://github.com/espruino/BangleApps
Fix mousemove getting stuck.
parent
1c160d7737
commit
5a400480e0
|
@ -8,3 +8,4 @@
|
||||||
0.08: Presentation parts!
|
0.08: Presentation parts!
|
||||||
0.09: Code cleanup and windows 11 support.
|
0.09: Code cleanup and windows 11 support.
|
||||||
0.10: Bugfixes.
|
0.10: Bugfixes.
|
||||||
|
0.11: Fix mouse move getting stuck.
|
||||||
|
|
|
@ -264,7 +264,7 @@ Bangle.on('lock', function(on) {
|
||||||
});
|
});
|
||||||
|
|
||||||
function startHolding() {
|
function startHolding() {
|
||||||
bt.tapKey(bt.KEY.F10);
|
bt.tapKey(0, bt.MODIFY.CTRL, () => bt.tapKey(0, bt.MODIFY.CTRL));
|
||||||
holding = true;
|
holding = true;
|
||||||
Bangle.buzz();
|
Bangle.buzz();
|
||||||
E.showMessage('Holding');
|
E.showMessage('Holding');
|
||||||
|
@ -274,7 +274,8 @@ function startHolding() {
|
||||||
function stopHolding() {
|
function stopHolding() {
|
||||||
clearTimeout(timeoutHolding);
|
clearTimeout(timeoutHolding);
|
||||||
if (holding) {
|
if (holding) {
|
||||||
bt.tapKey(bt.KEY.F10);
|
bt.tapKey(0, bt.MODIFY.CTRL);
|
||||||
|
// bt.tapKey(bt.KEY.F10);
|
||||||
homePitch = 0;
|
homePitch = 0;
|
||||||
homeRoll = 0;
|
homeRoll = 0;
|
||||||
holding = false;
|
holding = false;
|
||||||
|
@ -319,11 +320,13 @@ Bangle.on('drag', function(e) {
|
||||||
if (getTime() - cttl < 0.2) {
|
if (getTime() - cttl < 0.2) {
|
||||||
bt.clickButton(bt.BUTTON.LEFT);
|
bt.clickButton(bt.BUTTON.LEFT);
|
||||||
console.log("click left");
|
console.log("click left");
|
||||||
|
clearToSend = true;
|
||||||
}
|
}
|
||||||
// longer press in center
|
// 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) {
|
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);
|
bt.clickButton(bt.BUTTON.RIGHT);
|
||||||
console.log("click right");
|
console.log("click right");
|
||||||
|
clearToSend = true;
|
||||||
}
|
}
|
||||||
cttl = 0;
|
cttl = 0;
|
||||||
lastx = 0;
|
lastx = 0;
|
||||||
|
@ -385,5 +388,6 @@ function onBtn() {
|
||||||
}
|
}
|
||||||
setWatch(onBtn, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat: true});
|
setWatch(onBtn, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat: true});
|
||||||
|
|
||||||
|
// Start App
|
||||||
loadSettings();
|
loadSettings();
|
||||||
drawMain();
|
drawMain();
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "presentor",
|
"id": "presentor",
|
||||||
"name": "Presentor",
|
"name": "Presentor",
|
||||||
"version": "0.10",
|
"version": "0.11",
|
||||||
"description": "Use your Bangle to present!",
|
"description": "Use your Bangle to present!",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
|
|
Loading…
Reference in New Issue