Skip to content

agent.configure_keys

agent.configure_keys(settings)

Set the TUI key bindings. Each field names an action and the press (or list of presses) that triggers it; an omitted action keeps its default and an empty list unbinds it. The last call wins.

Parameters

  • settings: {submit: string | {[integer]: string}?, insert_newline: string | {[integer]: string}?, complete: string | {[integer]: string}?, edit_externally: string | {[integer]: string}?, interrupt: string | {[integer]: string}?, expand_output: string | {[integer]: string}?, cycle_mode: string | {[integer]: string}?, quit: string | {[integer]: string}?, disable_default_keymap: boolean?}
    • submit — Send the message, or run a / command or ! shell command.
    • insert_newline — Insert a newline into the message.
    • complete — Open the completion popup for slash commands and file paths.
    • edit_externally — Compose the message in $VISUAL / $EDITOR.
    • interrupt — Interrupt the running turn, compaction pass, or shell command.
    • expand_output — Toggle full-output expansion for tool and shell blocks.
    • cycle_mode — Cycle the active personality's mode.
    • quit — Quit when the prompt is empty.
    • disable_default_keymap — Start from an empty keymap so only configured bindings take effect, rather than layering the overrides onto the built-in defaults.