Also you could try something like this:
Create a new bool variable and call it Interrupted .
- On left click pressed event Set Interrupted to false -> retriggerable delay (2 sec) -> and create branch with Interrupted -> on false -- do stuff
- On released left click Set Interrupted to true.
Announcement
Collapse
No announcement yet.
Long Press Event?
Collapse
X
-
exadi repliedHow about a 2 seconds timer that starts when the left-click is pressed. When time elapses simply execute the event and bring up a context menu in this case.
When left-click is released stop and clear the timer so if it is held for less than 2 seconds nothing will happen.
EDIT. Always late ;D
- 2 likes
Leave a comment:
-
BrUnO XaVIeR repliedOn Press -> start timer.
If timer >= 2 -> do stuff.
On Release -> stop timer.
- 2 likes
Leave a comment:
-
shak started a topic Long Press Event?Long Press Event?
How can you detect and run an event on the long press of a button?
For example, holding the left click button for 2 seconds to bring up a context menu or something...
Any ideas?Tags: None
Leave a comment: