Skip to content

Commit 10ea061

Browse files
committed
docs: document the full composer keymap in README + keybindings page
The keybindings reference and README Keys table only covered a handful of composer keys (Enter, Alt+Enter, ↑). The composer is a full readline-style editor, but its editing/motion/history keys were undocumented. keybindings.md now has a dedicated **Composer** section grouped into Submit & compose, Cursor motion, Editing, and History & queue — every key drawn from the source of truth in src/runtime/app/subscribe.cpp (on_composer): word motion (^←/→), word delete (^W / Alt+D), kill line (^K / ^U), undo/redo (^Z / ^Y / ^S-Z), image paste (^V / Alt+V), the / @ # picker triggers, and the per-item queue editor (Alt+↑/↓) vs the recall-all ↑. Also adds the Global keys that were missing (^O/^U retrieved-context cards). README gains a compact second Keys table for the composer editor with a link to the full page.
1 parent f3909c2 commit 10ea061

2 files changed

Lines changed: 87 additions & 6 deletions

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,23 @@ rescore, ~2.5×). Full write-up:
169169

170170
| Key | Action | Key | Action |
171171
|-----|--------|-----|--------|
172-
| `Enter` | Send | `^K` | Command palette |
172+
| `Enter` | Send / queue | `^K` | Command palette |
173173
| `Esc` | Cancel / reject | `^J` | Thread list |
174174
| `S-Tab` | Cycle profile | `^P` | Model picker |
175175
| `Alt+Enter` | Newline | `^N` | New thread |
176176
| `^G` | Run code block | `^←/→` or `Alt+←/→` | Cycle threads |
177177

178+
The composer is a full readline-style editor:
179+
180+
| Key | Action | Key | Action |
181+
|-----|--------|-----|--------|
182+
| `^←/→` | Move by word | `^W` / `Alt+D` | Delete word back / forward |
183+
| `^K` / `^U` | Kill to line end / start | `^Z` / `^Y` | Undo / redo |
184+
| `^V` / `Alt+V` | Paste image | `/` `@` `#` | Command / file / symbol picker |
185+
| `` | Recall queue / history | `Alt+↑/↓` | Edit queued messages one at a time |
186+
187+
Full keymap: [docs/website/keybindings.md](docs/website/keybindings.md).
188+
178189
## More
179190

180191
<details>

docs/website/keybindings.md

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ slug: keybindings
88

99
Everything you can do without leaving the home row.
1010

11+
## Global
12+
1113
| Key | Action |
1214
|---|---|
1315
| [[Enter]] | Send the current message |
14-
| [[Alt+Enter]] | Insert a newline in the composer |
15-
| [[Ctrl+E]] | Expand the composer |
1616
| [[Esc]] | Cancel the current turn / reject a permission / close a modal (does NOT quit) |
1717
| [[S-Tab]] | Cycle permission profile (Write → Ask → Minimal) |
18-
| [[]] | On empty composer: recall queued messages for editing |
1918
| [[Ctrl+K]] | Command palette |
2019
| [[Ctrl+J]] | Thread list (opens at the current thread) |
2120
| [[Ctrl+N]] | New thread |
@@ -26,13 +25,84 @@ Everything you can do without leaving the home row.
2625
| [[Ctrl+P]] | Provider picker (switch LLM backend live) |
2726
| [[Ctrl+G]] | Run a code block from the newest reply on your real terminal |
2827
| [[Ctrl+R]] | Review pending diffs |
28+
| [[Ctrl+O]] | Browse the full text of a frozen retrieved-context card |
29+
| [[Ctrl+U]] | Expand / collapse the newest retrieved-context card (empty composer) |
2930
| [[Ctrl+L]] | Redraw the screen |
3031
| [[Ctrl+C]] | Quit (the only quit key) |
3132

33+
## Composer
34+
35+
The composer is a full readline-style editor. Keys are grouped below by what
36+
they do.
37+
38+
### Submit & compose
39+
40+
| Key | Action |
41+
|---|---|
42+
| [[Enter]] | Send the message (or, while streaming, queue it) |
43+
| [[Shift+Enter]] | Insert a newline |
44+
| [[Alt+Enter]] | Insert a newline (fallback for terminals that don't deliver Shift+Enter) |
45+
| [[Ctrl+E]] | Toggle the expanded (taller) composer |
46+
| [[/]] | Open the command palette — when line-leading (start of buffer or after a newline) |
47+
| [[@]] | Open the file-mention picker — at a word boundary; inserts an `@file` chip |
48+
| [[#]] | Open the symbol picker — at a word boundary; inserts a `#symbol` chip |
49+
50+
### Cursor motion
51+
52+
| Key | Action |
53+
|---|---|
54+
| [[]] / [[]] | Move one character (steps over an attachment chip as a single unit) |
55+
| [[Ctrl+←]] / [[Ctrl+→]] | Move one word (a run of punctuation counts as one unit) |
56+
| [[Home]] / [[End]] | Jump to start / end of the buffer |
57+
58+
### Editing
59+
60+
| Key | Action |
61+
|---|---|
62+
| [[Backspace]] | Delete the character (or whole chip) before the cursor |
63+
| [[Ctrl+W]] | Delete the word before the cursor (readline *unix-word-rubout*) |
64+
| [[Alt+D]] | Delete the word after the cursor (readline *kill-word*) |
65+
| [[Ctrl+K]] | Kill to end of line |
66+
| [[Ctrl+U]] | Kill to beginning of line (while the composer has text) |
67+
| [[Ctrl+Z]] | Undo — rewinds word-by-word, not keystroke-by-keystroke |
68+
| [[Ctrl+Y]] / [[Ctrl+Shift+Z]] | Redo |
69+
| [[Ctrl+V]] / [[Alt+V]] | Paste an image from the clipboard as an attachment chip |
70+
71+
Undo coalesces a run of typing into one step (broken on whitespace and on any
72+
non-typing edit), so one [[Ctrl+Z]] after a paste reaches the pre-paste state.
73+
[[Ctrl+V]] is intercepted by some terminals (Windows Terminal binds it to its
74+
own paste); [[Alt+V]] is the fallback that every terminal passes through.
75+
76+
### History & queue
77+
78+
| Key | Action |
79+
|---|---|
80+
| [[]] | On an empty composer: recall queued messages (if any), else walk back through your previous messages |
81+
| [[]] | Walk forward through history toward the live draft |
82+
| [[Alt+↑]] | Edit queued messages one at a time (loads the most recently queued first) |
83+
| [[Alt+↓]] | Step back out of the per-item queue editor toward the live draft |
84+
| [[Alt+Backspace]] | Drop the most recently queued message (empty composer, nothing peeked) |
85+
3286
## Queue behavior
3387

34-
Typing while a turn streams queues the message rather than interrupting. Press [[]] on an empty composer to pull every queued message back into the buffer (joined by newlines) with the cursor at the seam — destructive on the queue, so re-submit to re-queue. The composer placeholder hints `press ↑ to edit queued — type to queue another…` when relevant.
88+
Typing while a turn streams **queues** the message rather than interrupting.
89+
There are two ways to work with the queue:
90+
91+
- **[[]] on an empty composer** pulls *every* queued message back into the
92+
buffer at once (joined by newlines, cursor at the seam) — destructive on the
93+
queue, so re-submit to re-queue.
94+
- **[[Alt+↑]] / [[Alt+↓]]** step through the queue **one message at a time** to
95+
fix a single entry; [[Enter]] re-queues the edited message in place. This
96+
works even mid-edit, so you don't have to clear the composer first.
97+
98+
The composer placeholder hints `press ↑ to edit queued — type to queue
99+
another…` when relevant.
35100

36101
## Palette-only actions
37102

38-
Some actions have no dedicated key — reach them from the command palette ([[Ctrl+K]]). Notably **Rewind to checkpoint** opens a diff-preview picker over every checkpointed turn (git repo + idle session); see [Checkpoints & rewind](/docs/threads#checkpoints). **Compaction depth** cycles how full the context window gets before agentty auto-compacts in the background (75/90/95%) — see [Providers & Models](/docs/providers#1m-context-models).
103+
Some actions have no dedicated key — reach them from the command palette
104+
([[Ctrl+K]]). Notably **Rewind to checkpoint** opens a diff-preview picker over
105+
every checkpointed turn (git repo + idle session); see
106+
[Checkpoints & rewind](/docs/threads#checkpoints). **Compaction depth** cycles
107+
how full the context window gets before agentty auto-compacts in the background
108+
(75/90/95%) — see [Providers & Models](/docs/providers#1m-context-models).

0 commit comments

Comments
 (0)