Long-Press Counter
Count sustained presses.
Tap, click or press Space to keep count.
Tap anywhere inside or press Space
How the Long-Press Counter Works
The Long-Press Counter adds 1 each time a finger stays on the screen for at least 500 ms without moving more than 10 px. A progress ring fills during the hold, and the count rises when the ring completes.
- Press and hold: Touch the surface and keep the finger still.
- Watch the ring fill: The ring fills over the hold time, which is 500 ms by default.
- Lift after the count: The count rises when the hold time is reached. Lift to start the next press.
- Adjust hold time: Set the hold time from 300 ms to 3,000 ms (3 s) for different tasks.
Long-Press Counter Formula
The Long-Press Counter adds 1 when hold duration is equal to or greater than the hold threshold and movement stays under the movement limit.
- Hold
- Time the finger stays on the screen
- T_hold
- Required hold time, default 500 ms
- Movement
- Distance moved during the hold
Example: A finger holds for 820 ms and moves 3 px. 820 ≥ 500 and 3 < 10, so the count rises by 1.
Long-Press Counter Reference Table
The Long-Press Counter conversion table converts hold thresholds between milliseconds and seconds and lists their usual purpose.
| Hold threshold (ms) | Seconds | Typical purpose |
|---|---|---|
| 300 | 0.3 | Quick press in games |
| 400 | 0.4 | iOS context menu |
| 500 | 0.5 | Android long-press default |
| 1,000 | 1.0 | Confirm actions |
| 2,000 | 2.0 | Prevent accidental deletes |
| 3,000 | 3.0 | Safety hold controls |
About the Long-Press Counter
A Long-Press Counter is a gesture counter that tallies sustained presses held past a time threshold. Short taps and drags do not count.
The long press opens menus, starts drag-and-drop and confirms safety actions. Android uses a default long-press timeout of 500 ms, and many apps allow users to change the delay for accessibility.
Ways to Use the Long-Press Counter
There are 5 main uses of the Long-Press Counter, including deliberate counting and motor control tests.
- Deliberate counting: Users count only intended inputs in places where brushes and bumps happen.
- Motor control tests: Therapists count how many holds a patient keeps still for 2 seconds.
- Gesture testing: Developers confirm long presses trigger at the right time.
- Breath holds: Users hold for each breath cycle to count rounds.
- Pocket-safe tallies: Users count in a pocket or bag without false taps.
Tool Details
- Category
- Touch & Gesture Diagnostics
- Controls
- Taps and keys
- Input Support
- Touch, Pen, Mouse, Keys
- Offline Ready
- On your device