RUI Studio Help

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 nameDefaultRole
Long-press threshold300Hold still this long to fire one long press
Press-repeat start600Start repeating (never earlier than the long-press threshold)
Press-repeat period100Repeat interval; 0 means no repeat
Double-click max interval300Two 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 nameDefaultRole
Jitter allowance8 pxSmaller moves still count as a hold (click and long-press still work)
Drag threshold10 pxBeyond this, dragging starts (slider follows the finger)
Double-click max distance12 pxTwo points too far apart are not a double-click
Flick min speed300 px/sRelease 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 nameDefaultRole
Inertia tick16 msHow often one inertia frame advances. 16–20 is typical
Inertia stop speed50 px/sCoasting stops when speed falls below this
Inertia decay950Each 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 nameDefaultRole
Horizontal scroll step3 pxPixels per step. Larger is faster and more jumpy
Scroll step delay1 msPause between steps

Rough duration ≈ screen width ÷ step × delay (ms). If the animation is too slow, raise the step or lower the delay.

Typical tweaks

SymptomTry
Hold feels shaky; long-press dropsRaise jitter allowance
Slider will not drag (reads as a tap)Lower drag threshold
Double-click too hard / too easyInterval and max distance
Repeat too fast / too slowRepeat period; first fire = repeat start
Flick page deaf / false flicksLower / raise flick min speed
Page slide too slow or too fastHorizontal step and step delay
Double-click ms change does nothing on deviceExport and burn again; the touch timebase must be correct