Skip to main content

Module keymap_registry

Module keymap_registry 

Source
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§

KeymapHandle
Editor-facing handle to the keymap registry.
KeymapRegistry
Keymap registry. Cheap to clone (Arc-backed); every caller (App, plugins, the future WIT host) holds a KeymapHandle that wraps the same underlying registry.
KeymapReverseLookupHandle
MARG.2 (2026-06-03): adapter that implements lattice_completion::KeymapReverseLookup over a KeymapRegistry’s reverse cache + a [CommandRegistry] for the canonical-name → [CommandId] resolution. Editor boot constructs one and passes it to lattice_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 to KeymapHandle::pop_layer to remove the layer. Layers created implicitly by a bind also get one internally, but it is never handed out — remove those with KeymapHandle::remove_layer.

Enums§

KeymapCapability
Privilege bundle a writer presents when calling capability-gated bind APIs (slice 8.h). Mirrors the WIT keymap-write capability variants in DESIGN.md §5.5: the host hands one of these to every caller of the registry – built-in startup, the user’s compiled init.rs, each loaded plugin – and the registry enforces the layer scope before committing any write.
KeymapError
Errors returned by the capability-gated bind APIs. Slice 8.h.
PushLayerKind
What kind of runtime-pushed layer to install.