pub struct GestureConfig {
pub multi_click_timeout: Duration,
pub long_press_threshold: Duration,
pub drag_threshold: u16,
pub chord_timeout: Duration,
pub swipe_velocity_threshold: f32,
pub click_tolerance: u16,
}Expand description
Thresholds and timeouts for gesture recognition.
Fields§
§multi_click_timeout: DurationTime window for double/triple click detection (default: 300ms).
long_press_threshold: DurationDuration before a stationary mouse-down triggers long press (default: 500ms).
drag_threshold: u16Minimum manhattan distance (cells) before a drag starts (default: 3).
chord_timeout: DurationTime window for chord key sequence completion (default: 1000ms).
swipe_velocity_threshold: f32Minimum velocity (cells/sec) for swipe detection (default: 50.0).
When a drag is released, its net displacement from the mouse-down
position is taken along the dominant axis; a perfect diagonal, or a net
distance below drag_threshold, is not a swipe. Velocity is that
distance over the time from the drag’s first movement to the release,
so pausing before a flick does not slow it down. At or above this
threshold the release emits Swipe right after DragEnd.
click_tolerance: u16Position tolerance for multi-click detection (manhattan distance, default: 1).