The ShortLongPressDetector component recognizes a press of a push button and identifies it as a short or long press based on the assigned time value in the Long Press Time. The short press is identified on a falling edge of the Button Input slot if the time of the press is less than set in the Long Press Time slot. The long press is identified if the time of the press lasts at least as set in the Long Press Time slot.
The ShortLongPressDetector component has the following slots:
-
Short Press: an output value, which is true (On) when the press of the push button is identified as a short press;
-
Long Press: an output value, which is true (On) when the press of the push button is identified as a long press;
-
Button Input: receives a signal from a push button;
-
Long Press Time: allows to set a time value for a long press identification—a press shorter than this time is identified as a short press, a press longer than this time is identified as a long press;
-
Short Press Impulse: allows to set a time value to uphold a short press On state in the Short Press output slot.