pub struct KeymapResolution {
pub mode: BindingMode,
pub hits: Vec<LayerHit>,
}Expand description
Full trace of all layer hits for a chord sequence in one
BindingMode. Returned by KeymapHandle::resolve_trace.
hits is ordered by layer priority ascending (Builtin first,
Buffer last). The winner is the last active hit (highest-priority
active layer wins). An empty hits vec means the chord is
completely unregistered across all layers.
Fields§
§mode: BindingModeThe binding mode queried.
hits: Vec<LayerHit>All layer hits in priority order (ascending). Empty when no layer has a terminal binding for the queried chord sequence.
Implementations§
Source§impl KeymapResolution
impl KeymapResolution
Sourcepub fn winner(&self) -> Option<&LayerHit>
pub fn winner(&self) -> Option<&LayerHit>
The winning hit: the last active hit in priority order
(highest-priority active layer). None when no active layer
has a binding for the queried chord.
Caveat: this ranks by the static KeymapLayer order, where
mode layers sit below User / Buffer and same-kind mode layers
sort by name. Dispatch
(KeymapHandle::lookup_with_context)
instead overlays active mode layers above User / Buffer, in
activation order. When an active mode layer and a User / Buffer
layer both bind the chord, or two active modes do, this can name a
different hit than the one that fires.
Trait Implementations§
Source§impl Clone for KeymapResolution
impl Clone for KeymapResolution
Source§fn clone(&self) -> KeymapResolution
fn clone(&self) -> KeymapResolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more