Expand description
Re-export shim — KeymapCapability, KeymapError,
KeymapHandle, KeymapRegistry, LayerId, and
PushLayerKind moved to lattice-keymap in K.3
(2026-06-07). KeymapReverseLookupHandle stays here
because it implements lattice_completion::KeymapReverseLookup
— lattice-keymap cannot depend on lattice-completion.
Structs§
- Keymap
Handle - Editor-facing handle to the keymap registry.
- Keymap
Registry - Keymap registry. Cheap to clone (
Arc-backed); every caller (App, plugins, the future WIT host) holds aKeymapHandlethat wraps the same underlying registry. - Keymap
Reverse Lookup Handle - MARG.2 (2026-06-03): adapter that implements
lattice_completion::KeymapReverseLookupover aKeymapRegistry’s reverse cache + a [CommandRegistry] for the canonical-name → [CommandId] resolution. Editor boot constructs one and passes it tolattice_completion::KeybindingAnnotator::new. - LayerId
- Stable id for a registered layer. Issued by
KeymapHandle::push_layer(minor-mode overlays, per-buffer bindings); the caller passes it toKeymapHandle::pop_layerto remove the layer. Layers created implicitly by abindalso get one internally, but it is never handed out — remove those withKeymapHandle::remove_layer.
Enums§
- Keymap
Capability - Privilege bundle a writer presents when calling
capability-gated bind APIs (slice 8.h). Mirrors the WIT
keymap-writecapability variants in DESIGN.md §5.5: the host hands one of these to every caller of the registry – built-in startup, the user’s compiledinit.rs, each loaded plugin – and the registry enforces the layer scope before committing any write. - Keymap
Error - Errors returned by the capability-gated bind APIs. Slice 8.h.
- Push
Layer Kind - What kind of runtime-pushed layer to install.