(sigil tui input)
(sigil tui input) - Text input widget
Mutable input state with Emacs-style keybindings for single-line text editing. Handles cursor movement, deletion, and text insertion.
Exports
make-input-stateprocedureCreate a new input state with empty value.
input-valueprocedureGet the current input value.
input-cursorprocedureGet the current cursor position.
input-set-value!procedureSet the input value.
input-set-cursor!procedureSet the cursor position.
input-clear!procedureClear the input.
input-handle-keyprocedureHandle a key event, returning a symbol or #f.
Returns 'submit when Enter is pressed, #f otherwise. Modifies the input state in place.