pub struct TouchButtonsConfig {
pub poll_ms: u64,
pub long_press_ms: u64,
pub multi_tap_ms: u64,
pub zone_y_min: u16,
pub zone_x_left: u16,
pub zone_x_right: u16,
}Fields§
§poll_ms: u64Touch-poll interval.
long_press_ms: u64Hold time before a press becomes ButtonAction::Long.
multi_tap_ms: u64Max gap between taps that still counts as a multi-tap. Set to 0 to
disable multi-tap counting entirely: each tap emits Short(1) on the next
poll after release (~poll_ms), with no counting delay — for
latency-sensitive input like an encoder (#58). See
with_timing /
ButtonTiming::immediate_single_press for the cross-driver preset.
zone_y_min: u16Zone strip: touches above this Y are ignored.
zone_x_left: u16X below this is ButtonId::Left.
zone_x_right: u16X below this (and ≥ zone_x_left) is ButtonId::Center; above,
ButtonId::Right.
Implementations§
Source§impl TouchButtonsConfig
impl TouchButtonsConfig
Sourcepub fn with_timing(timing: ButtonTiming) -> Self
pub fn with_timing(timing: ButtonTiming) -> Self
[Default] geometry/poll, but with the press-decoding timings taken from
the cross-driver ButtonTiming — the same type and presets the Fire27
physical buttons take (ButtonResources::into_buttons_with_timing, feature
buttons). Use ButtonTiming::immediate_single_press for instant
single-press input (an encoder).