Skip to main content

Module pane_keymap

Module pane_keymap 

Source
Expand description

Terminal keyboard bindings for the pane workspace (bd-21pbi.2).

This is the terminal host’s binding layer over the canonical, host-agnostic command model in ftui_layout::pane_command (bd-21pbi.1). It provides:

  • key_to_pane_command: the default terminal keymap, mapping raw KeyEvents to canonical PaneCommands. It binds only modifier-qualified keys (and Tab/BackTab) so it coexists with application shortcuts and never steals unrelated plain keys.
  • PaneKeyboardController: a reusable host helper that translates a key, resolves it against a live PaneTree, applies any structural operations, and tracks focus/maximize state — so pointer-free pane workflows are fully operable from a few lines of host glue.
  • render_pane_focus_ring: a stable focus indicator (a distinct border on the active pane), generic over the render target so it works with both a Frame and a bare Buffer.
  • pane_keyboard_hints: discoverable shortcut hints for a help panel.

The keymap is the terminal half of the cross-host parity guarantee: it emits the same PaneCommand stream a conformant web binding (bd-21pbi.3) would for equivalent intent, so both hosts reach identical pane state.

Structs§

PaneFocusRing
A stable focus indicator: a distinct border drawn around the active pane.
PaneKeyHint
One discoverable keyboard hint for a help panel.
PaneKeyboardController
A reusable terminal pane keyboard host: translates keys to commands, resolves them against a live tree, applies structural operations, and tracks focus + maximize state. Hosts own the PaneTree; this owns the focus state and a monotonic operation counter.

Enums§

PaneKeyOutcome
Outcome of feeding one key event to a PaneKeyboardController.

Functions§

key_to_pane_command
Translate a raw terminal key event into a canonical PaneCommand.
pane_keyboard_hints
The canonical, discoverable pane keyboard shortcut hints, in display order.
render_pane_focus_ring
Draw a focus ring around rect on any render target (Frame or Buffer).