Struct Profile
pub struct Profile {
pub timeout: Option<u16>,
pub interrupt_response: InterruptResponse,
pub required_idle_time: Option<u16>,
pub hold_trigger_positions: Option<Slice<u16, smart_keymap_core::::key::tap_hold::Profile::{constant#0}>>,
pub quick_tap_ms: Option<u16>,
pub pending_output: PendingOutput,
}Expand description
One tap-hold behavior profile (timeout, interrupt flavor, idle gate, hold triggers, quick-tap).
Profile 0 is Config::default_profile;
extra profiles live in Config::profiles
and are selected per key via Key::profile.
Fields§
§timeout: Option<u16>The timeout (in number of milliseconds) for a tap-hold key to resolve as hold.
Counted from the physical press of this keymap index. When this tap-hold is nested under another pending key (e.g. chorded passthrough), the keymap folds already-elapsed time into the scheduled delay so the configured timeout is not additive.
When None, the tap/hold decision does not timeout;
the key resolves only on release (as tap) or interruption
(depending on InterruptResponse).
interrupt_response: InterruptResponseHow the tap-hold key should respond to interruptions.
required_idle_time: Option<u16>Amount of time (in milliseconds) the keymap must have been idle in order for tap hold to support ‘hold’ functionality.
This reduces disruption from unexpected hold resolutions when typing quickly.
hold_trigger_positions: Option<Slice<u16, smart_keymap_core::::key::tap_hold::Profile::{constant#0}>>When set, only these keymap indices may force an interrupt-as-hold resolution. When unset, any interrupting key may force hold (subject to InterruptResponse).
JSON field name matches the Nickel authoring surface (hold_trigger_key_positions).
Length is bounded by MAX_HOLD_TRIGGER_POSITIONS.
quick_tap_ms: Option<u16>If this tap-hold key is pressed again within this many milliseconds of its
previous press (ZMK quick-tap-ms), immediately resolve as tap.
Useful for hold-to-repeat on the tap letter (e.g. backspace) without
waiting for the hold timeout. None disables (default).
Unlike Self::required_idle_time (any recent activity), this is
scoped to re-presses of the same keymap index.
pending_output: PendingOutputSpeculative HID while this tap-hold is pending.
PendingOutput::NoOutput(default): no HID until tap vs hold settles.PendingOutput::Hold: emit the hold binding’s HID while still pending (ZMKhold-while-undecided/ QMK Speculative Hold / FAKeager_decision = 'hold).
Implementations§
§impl Profile
impl Profile
pub const fn allows_hold_trigger(&self, other_keymap_index: u16) -> bool
pub const fn allows_hold_trigger(&self, other_keymap_index: u16) -> bool
Whether an interrupt from other_keymap_index may force hold.
When Self::hold_trigger_positions is set,
only those indices count as hold triggers.
When unset, any other key may force hold.