Skip to main content

Module input

Module input 

Source
Expand description

Backend-agnostic key input types used by the vim engine.

Phase 8 of the hjkl-buffer migration replaced tui_textarea::Input / tui_textarea::Key with these in-crate equivalents so the editor can drop the tui-textarea dependency entirely.

Structs§

Input
A key press with modifier flags. The vim engine reads modifiers directly off this struct (e.g. input.ctrl && input.key == Key::Char('d')).

Enums§

Key
A key code, mirroring the subset of [crossterm::event::KeyCode] the vim engine actually consumes. Null is the conventional sentinel for “no input” (matching the previous tui_textarea::Key shape) so call sites can early-return on unsupported keys.

Functions§

decode_macro
Reverse of encode_macro — parse the textual form back into Input events for replay. Unknown <…> tags are dropped silently so the caller can roundtrip text the user pasted into a register without erroring out on partial matches.
encode_macro
Serialize a captured macro into vim’s keystroke notation (<Esc>, <C-d>, <lt>, etc.) so it can live as plain text in a register slot. Used when q{reg} finishes recording.
from_planned
Decode a crate::types::Input (alias: crate::PlannedInput) to the engine-internal Input type.