Keybindings
The keymap is fixed. Rebinding is not built yet, and the Keys pane in settings says so rather than pretending otherwise.
Windows and tabs
| Key | Does |
|---|---|
cmd-n |
New window |
cmd-t |
New tab, in the directory you are working in |
cmd-w |
Close the pane, then the tab, then the window |
cmd-shift-] / cmd-shift-[ |
Next / previous tab |
cmd-1 … cmd-9 |
Go to tab by number |
Panes
| Key | Does |
|---|---|
cmd-d |
Split right |
cmd-shift-d |
Split down |
cmd-] / cmd-[ |
Next / previous pane |
Dividers can be dragged. Clicking a pane focuses it.
The session
| Key | Does |
|---|---|
cmd-c / cmd-v |
Copy / paste |
cmd-k |
Clear the screen and the scrollback |
cmd-f |
Find in session |
cmd-g / cmd-shift-g |
Next / previous match |
cmd-up / cmd-down |
Previous / next prompt |
cmd-enter |
Ask AI for a command |
cmd-r |
Review a pull request |
cmd-e |
Ask why the last command failed |
return |
Approve and run the command being proposed |
cmd-return |
Put the proposed command on the input line instead |
cmd-shift-return |
Run a proposal that was held back for looking destructive |
cmd-delete |
Forget the AI conversation and start from nothing |
cmd-shift-enter |
Fold or unfold the block at the cursor |
cmd-shift-s |
Send the block's output to the pane that had focus before this one |
cmd-shift-c |
Compare the block's output with the last run of the same command |
cmd-shift-m |
Copy the session as a runbook: every command and its output, as Markdown |
cmd-+ / cmd-- / cmd-0 |
Bigger, smaller, actual size — cmd-= is bigger too, for keyboards where + needs shift |
While typing a command
| Key | Does |
|---|---|
→ |
Take the grey suggestion, or the chosen completion |
return |
Take the chosen completion; with nothing chosen, run the line |
↑ ↓ |
Choose in the completion list, while one is open |
escape |
Close the list; the escape still reaches the shell |
tab |
Nothing here — this is the shell's own completion |
See Suggestions.
Everything else
| Key | Does |
|---|---|
cmd-shift-p |
Command palette: this project's commands, then every command above |
cmd-, |
Settings — and closes it again |
escape |
Closes whatever is open on top; otherwise reaches the shell |
cmd-q |
Quit |
The mouse
- One click places the selection, two select a word, three select the line
- Clicking a fold summary puts the output back
cmd-click follows an OSC 8 link- Dropping a file from the Finder writes its path where you are typing, and
a space after it. Several files at once become several paths. A path is left
bare when it can be, and quoted when it cannot — a space, a
$, a;; a newline in a filename, which macOS allows, is written as$'…\n…'so that dropping it cannot submit the line - Shift reaches past a program that has grabbed the mouse, so you can still
select text in
vimorhtop
What the shell gets
Escape, arrows, function keys, and control and option combinations are encoded and sent to the shell. Printable characters are not sent from the key event at all: they go through the system's input handler first, which is what allows input methods and dead keys to compose. See Architecture.
One key is worth naming on its own:
| Key | Sends | For |
|---|---|---|
return |
CR |
Run the line |
shift-return |
ESC CR |
A new line inside a prompt that takes several |
option-return |
ESC CR |
The same thing, under the name Macs use for it |
xterm sends CR for return however it is modified, so nothing on the other end
can tell shift-return from return. Every prompt that accepts more than one
line has had to work around that, and they have all settled on the same
sequence: ESC CR, which is what meta-return sends. It is what Claude Code's
own /terminal-setup writes into iTerm2 and VS Code, and eterm sends it without
being asked.
An application that would rather not rely on a convention can ask instead. eterm
answers CSI ? u and keeps the flags pushed with CSI > 1 u, and then reports
the keys the old encodings cannot express as CSI code ; modifiers u:
| Key | Sent as |
|---|---|
shift-return, option-return |
CSI 13 ; 2 u, CSI 13 ; 3 u |
shift-tab, shift-backspace |
CSI 9 ; 2 u, CSI 127 ; 2 u |
escape, even alone |
CSI 27 u |
ctrl-i, ctrl-m, ctrl-[ |
CSI 105 ; 5 u, CSI 109 ; 5 u, CSI 91 ; 5 u |
Everything else keeps the encoding it has always had, which is what that flag on
its own means: arrows, function keys, ctrl-a, and a plain return are unchanged.
The three at the bottom are not merely ambiguous but identical — ctrl-i is a
tab — and the whole point of asking is to tell them apart.
Only the first flag is honoured. An application that also asks for key release events or alternate keys gets a terminal reporting fewer events than it requested rather than wrong ones.
cmd-return is not this. It opens AI mode, and no combination with cmd in it
is ever sent to the shell.