Skip to main content

Crate buffr_modal

Crate buffr_modal 

Source
Expand description

Vim-style modal keybinding engine for buffr.

Two-layer modal model:

  • Page mode (PageMode) — scroll, tab switch, omnibar, hint mode, command line. Owned by this crate.
  • Insert mode — typing in <textarea> / contenteditable / form fields. Delegates to hjkl_engine::Editor against a mirrored hjkl_buffer::Buffer synced to the DOM via CEF.

See PLAN.md “Edit-mode integration with hjkl-*” for the full data flow.

§Layout

Re-exports§

pub use actions::Mode;
pub use actions::PageAction;
pub use actions::PageMode;
pub use edit_mode::EditSession;
pub use engine::DEFAULT_TIMEOUT;
pub use engine::EditModeStep;
pub use engine::Engine;
pub use engine::Step;
pub use host::BuffrEditIntent;
pub use host::BuffrHost;
pub use key::Key;
pub use key::KeyChord;
pub use key::Modifiers;
pub use key::NamedKey;
pub use key::ParseError;
pub use key::parse_key;
pub use key::parse_keys;
pub use keymap::BindError;
pub use keymap::Keymap;
pub use keymap::Lookup;

Modules§

actions
Page-mode action enum + mode states.
edit_mode
Edit-mode session — wires hjkl_engine::Editor to a BuffrHost against an in-memory text buffer.
engine
Page-mode dispatcher engine.
host
BuffrHost — the host adapter that wires hjkl_engine::Editor to the buffr browser shell.
key
Vim-notation key parser.
keymap
Keymap trie — prefix-indexed dispatcher from chord sequences to PageAction.

Structs§

EngineModifiers
Modifier bits accompanying every keystroke.

Enums§

PlannedInput
Single input event handed to the engine.
SpecialKey
Special key codes — anything that isn’t a printable character.
VimMode
Coarse vim-mode a host app can display in its status line.