Expand description
§hjkl-form
Vim-modal forms for hjkl-based apps.
Each text field hosts its own hjkl_engine::Editor, so users get
the full vim grammar inside form inputs. The form itself runs a
small FSM over Form-Normal / Form-Insert modes for focus
navigation and validation, delegating keystrokes to the focused
field’s editor when in insert mode.
Renderers live in adapter crates: hjkl-editor-tui::form::draw_form
ships the ratatui flavor.
Re-exports§
pub use field::CheckboxField;pub use field::Field;pub use field::FieldMeta;pub use field::SelectField;pub use field::SubmitField;pub use field::TextFieldEditor;pub use form::Form;pub use form::FormEvent;pub use form::FormMode;pub use host::FormFieldHost;pub use submit::SubmitFn;pub use submit::SubmitOutcome;pub use validate::Validator;pub use validate::validate_field;
Modules§
- field
- Field types — the building blocks of a
Form. - form
Form— the top-level container.- fsm
- Form-level FSM. Routes keys between focus navigation, field delegation, and submit firing.
- host
- Minimal
Hostimpl for per-field editors. - submit
- Submit handler types.
- validate
- Field validators.
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§
- Coarse
Mode - Discipline-agnostic coarse mode for app chrome (status badge, cursor
shape). Unlike
VimMode— which names vim-specific states —CoarseModeis a minimal projection: “are we inserting text, selecting, or idle?” - Key
- A key code, mirroring the subset of [
crossterm::event::KeyCode] the vim engine actually consumes.Nullis the conventional sentinel for “no input” (matching the previoustui_textarea::Keyshape) so call sites can early-return on unsupported keys.