# Shortcuts

Keys that send, edit, cancel and navigate input in the TUI.

| Key | Action |
|---|---|
| `Enter` | Send the current input. While a run is in flight only plain text is sent, as a **steer** message delivered to the running loop; `/` commands are neither listed nor sent until the run ends |
| `Alt+Enter` | Insert a newline |
| `!` prefix | Since v1.3.0, `!<command>` runs the rest of the line with `$SHELL -c` (`/bin/sh` when unset) in the TUI's work directory, from the TUI process itself rather than the sandbox, for at most 30 minutes; the input box turns red with a `$ ` prompt while the line starts with `!`. The exit code and output (up to 32 KiB) print in the transcript, then go to the agent as a `[Shell command]` message asking it to report the result; that message is hidden from the chat history. Like any other message it needs a registered model and a connected daemon, and `Esc` / `Ctrl+C` stop the command. Since v1.3.2 a command containing the word `sudo` first checks for a valid sudo ticket; without one a `System password:` popup opens, the password is verified with `sudo -S -v`, and the command then runs reusing that ticket. A wrong password ends with `[Denied] password: incorrect password`; `Esc` closes the popup without running the command |
| `/` | Begin slash-command filter (popup picker — Up / Down to navigate, Tab / Enter to autocomplete into the textarea, Esc to dismiss) |
| `Up` / `Down` | Walk input history when the cursor is on the first / last line (per-session `.cmd_history` file) |
| `Esc` | Outside a popup, in this order (v1.2.0): dismiss the command picker, else close the notice box, else open the cancel popup while running — **No**, **Yes (cancel)**, or **Pause (keep pending)**. Cancel discards the pending task (since v1.3.9 it stays in chat history with a `[Canceled]` reply), pause stops the run and leaves it resumable through `/pending`; both also stop the task's background jobs. A run that has emitted nothing yet is cancelled straight away with no popup. Otherwise clear a non-empty input; with the input empty and no run, open the background-task menu (v1.3.8): **No**, each running leg and **All** (two or more), then a confirmation before the pick is cancelled |
| `Ctrl+C` | While running, cancel the task outright (the user-cancel path — the pending task is discarded and, since v1.3.9, kept in chat history as `[Canceled]`); otherwise print `ctrl+c again to quit`. A second `Ctrl+C` within 3 seconds quits the TUI |
