Press-and-hold / Long-Press gestures/event in espruino

40 Views Asked by At

Touch for screen or press key gestures are already assigned and the action is triggered when finger is released.

 setWatch(f_Action1, BTN1, { repeat: true }); 

 Bangle.on('touch', function(button){
    switch(button){
     case 1:
       f_Action2();
       break;
    }
 }

How can be time periods defined so after release, different actions can be triggered depending on the hold time?

0

There are 0 best solutions below