Expand description
Crossterm-coupled test harness for the renderer-neutral
lattice_host::keymap_normal catalog. Slice 5.4 / slice 3
moved the production code to lattice-host; the tests stay
here because their ev() helper builds KeyChord values
via crate::chord::from_event(&KeyEvent { ... }), and the
crossterm adapter only exists in this crate.
pub use re-exports every public item from the host so
call sites that referenced lattice_ui_tui::keymap_normal::*
before the move keep resolving without source changes.
Functions§
- attach_
count - Slice 8.g.iv: attach the input-side count accumulator to a
resolved
Action::Invoke. Pure function; non-Invokeactions pass through unchanged. - binding_
layer_ mode - Resolve the next key of a multi-chord Normal-mode sequence
via the registry. The caller supplies the prefix chord
sequence already absorbed; this helper appends the
normalised current chord and looks the resulting path up in
the trie.
Bound-> the bound action; everything else (Partial/Unbound) ->Action::Noneto drop the pending state, matching every legacyresolve_after_*’s catchall. - expand_
grammar_ rows - Derive the rows a grammar binding implies but nobody wrote: a motion’s Visual / Select / operator-pending peers, and a text object’s.
- lookup_
normal - Look up a single-key event in the Normal-mode catalog.
Returns
Some(action)when the chord is bound;Noneto signal the caller (input::translate_normal) to fall back to its legacy match arm for the not-yet-migrated bindings. - lookup_
normal_ with_ prefix - operator_
prefix - Map an operator id to its primary chord prefix in the
Normal-mode trie. Used by the
Pending::AfterOperatorandPending::AfterTextObjectresolvers to compute the lookup path. - register_
normal_ bindings - Register the slice 8.g.i Normal-mode catalog into the
supplied handle’s
Builtinlayer. The legacyinput::translate_normalkeeps its match arm for the bindings not yet in this catalog. - register_
operator_ bindings - Register the slice 8.g.iii operator-pending paths for one
operator under
op_prefix. Same shape across every operator: motion targets, the doubled-operator current-line shorthand,i_/a_text-object pendings + their resolutions, and thef/F/t/Tfind-char pendings (resolution stays in legacyresolve_after_find_charuntil 8.g.v). - register_
operator_ bindings_ in - CM.2:
register_operator_bindingswith the layer chosen by the caller.