Touch gesture parameters
Parameters → Touch gestures. Time, distance/speed, inertia, and flick-page scroll. Re-export and burn after a change.
Entry: Parameters → Touch gestures. Scroll down the same tab for Inertia and Flick-page scroll. Effect demo uses the same numbers.
After a change you must export code again and burn before the device picks it up.
Time (ms)
| UI name | Default | Role |
|---|---|---|
| Long-press threshold | 300 | Hold still this long to fire one long press |
| Press-repeat start | 600 | Start repeating (never earlier than the long-press threshold) |
| Press-repeat period | 100 | Repeat interval; 0 means no repeat |
| Double-click max interval | 300 | Two taps farther apart are not a double-click |
After a long press or repeat has already fired, release is not treated as a normal click, so you do not get an extra step.
Distance / speed (px / px/s)
| UI name | Default | Role |
|---|---|---|
| Jitter allowance | 8 px | Smaller moves still count as a hold (click and long-press still work) |
| Drag threshold | 10 px | Beyond this, dragging starts (slider follows the finger) |
| Double-click max distance | 12 px | Two points too far apart are not a double-click |
| Flick min speed | 300 px/s | Release must be fast enough to count as a flick (flick-jump / full-page scroll) |
Keep “jitter allowance ≤ drag threshold”. Raise jitter if the finger is shaky; lower the drag threshold slightly if the slider feels dull. Lower flick min speed if page flicks feel deaf; raise it if they fire by accident.
Inertia
After a flick is recognized, the gesture engine can keep coasting (decelerate). Full-page flick scroll / flick-jump uses its own scroll animation and suppresses this inertia so the two do not fight.
| UI name | Default | Role |
|---|---|---|
| Inertia tick | 16 ms | How often one inertia frame advances. 16–20 is typical |
| Inertia stop speed | 50 px/s | Coasting stops when speed falls below this |
| Inertia decay | 950 | Each tick multiplies speed by this per-mille. 950 = keep 95% |
Closer to 1000 means a longer glide; a smaller number stops sooner. Defaults are fine for most projects.
Flick-page scroll
These two control how the screen slides sideways on a flick page change. They are not the inertia pair above. The page must also use “scroll transition” and have left/right targets. See Touch area and Pages.
| UI name | Default | Role |
|---|---|---|
| Horizontal scroll step | 3 px | Pixels per step. Larger is faster and more jumpy |
| Scroll step delay | 1 ms | Pause between steps |
Rough duration ≈ screen width ÷ step × delay (ms). If the animation is too slow, raise the step or lower the delay.
Typical tweaks
| Symptom | Try |
|---|---|
| Hold feels shaky; long-press drops | Raise jitter allowance |
| Slider will not drag (reads as a tap) | Lower drag threshold |
| Double-click too hard / too easy | Interval and max distance |
| Repeat too fast / too slow | Repeat period; first fire = repeat start |
| Flick page deaf / false flicks | Lower / raise flick min speed |
| Page slide too slow or too fast | Horizontal step and step delay |
| Double-click ms change does nothing on device | Export and burn again; the touch timebase must be correct |