Text Input

Text input

BMUX prompt text fields, searchable selects, and editable text/number form fields use shared Unicode-aware text editing primitives from bmux_text_edit.

Prompt input bindings

Prompt text inputs support standard terminal editor behavior where the terminal reports the corresponding key event:
BindingBehavior
left / rightMove one grapheme left or right
alt+left / ctrl+leftMove one word left
alt+right / ctrl+rightMove one word right
home / endMove to start or end of the text field
ctrl+a / ctrl+eMove to start or end of the text field
backspace / deleteDelete one grapheme backward or forward
ctrl+uClear search-select query text
The reusable bmux_text_edit crate owns text storage, cursor movement, deletion, word boundaries, Unicode grapheme handling, and terminal-width projection. Rendering and prompt submission remain owned by BMUX attach UI.

Notes

  • Word movement uses the current bmux_text_edit word-boundary policy.
  • Modifier reporting varies by terminal; if a terminal does not send distinct alt/ctrl arrow events, BMUX cannot apply the matching word movement binding.
  • Direct OS clipboard access is intentionally outside bmux_text_edit; future selection/cut/copy/paste support should expose editor primitives for app-owned clipboard integration.
  • Secret entry (API keys, passwords) uses bmux_tui_components::text_input::TextInputMask on TextInputState: masked or hidden rendering, no selection or copy-out, redacted Debug/snapshots, and zeroization on wipe() and drop. TextEditBuffer::wipe() zeroizes the text and its undo history.