# Interface & Shortcuts

> Source: https://parallelworks.com/docs/ai/code/interface

# Interface & Shortcuts

Interactive `pw code` runs in a full-screen terminal interface: a scrollable transcript on top, the message composer at the bottom, and a status line showing the current model, allocation, and token usage. This page covers the interface elements and every keyboard shortcut.

At rest, the bottom of the screen looks like this:

<TerminalWindow>
  
  
  
</TerminalWindow>

## The Transcript

- **Streaming markdown**: Responses stream in as the model generates them and are rendered as formatted markdown, including highlighted code blocks.
- **Syntax-highlighted diffs**: File edits are shown as diffs with syntax highlighting on the changed lines.
- **Repo banner**: The startup banner includes the repository name and current branch when the workspace is a git repository.
- **Collapsible blocks**: Long tool outputs collapse to a summary line; press <kbd>Ctrl</kbd>+<kbd>O</kbd> to expand or collapse the most recent one.
- **Jump to bottom**: When you scroll up, a centered **Jump to bottom (ctrl+end) ↓** pill appears; new output stops following until you return to the tail (or press <kbd>Ctrl</kbd>+<kbd>R</kbd> to re-enable following).
- **Search**: Press <kbd>Ctrl</kbd>+<kbd>F</kbd> and type to search the transcript; matches are highlighted, <kbd>Enter</kbd>/<kbd>↓</kbd> and <kbd>↑</kbd> step between them, and <kbd>Esc</kbd> closes the search.

The mouse wheel always scrolls the transcript. Clicking on interface elements is off by default; enable the **Mouse clicks** option in `/settings` if you want clicks to select picker rows and toggle blocks.

## Keyboard Shortcuts

Press <kbd>?</kbd> at an empty prompt to toggle the shortcuts overlay in the session itself.

| Key | Action |
| --- | --- |
| <kbd>Enter</kbd> | Send the message. While the agent is working, the message is queued and sent automatically when the turn ends. |
| <kbd>Shift</kbd>+<kbd>Enter</kbd> | Insert a newline (<kbd>Alt</kbd>+<kbd>Enter</kbd> or <kbd>Ctrl</kbd>+<kbd>J</kbd> on terminals that cannot distinguish it). |
| <kbd>↑</kbd> / <kbd>↓</kbd> | Recall earlier prompts, including from previous sessions in the same workspace. While the agent is working, <kbd>↑</kbd> at an empty prompt pulls back your newest queued message for editing. |
| <kbd>↓</kbd> (past the newest entry) | Move the cursor into the agent switcher when subagents are running. See [Subagents](/docs/ai/code/subagents) for the switcher's own keys. |
| <kbd>Esc</kbd> | Close an open overlay; interrupt the running turn or `!` command. At the prompt, press once to arm and again to clear the typed text. |
| <kbd>Ctrl</kbd>+<kbd>C</kbd> | Interrupt the running turn; with text typed, clear the composer. At an empty prompt, press twice to quit. |
| <kbd>Ctrl</kbd>+<kbd>D</kbd> | Quit (at an empty prompt). |
| <kbd>Shift</kbd>+<kbd>Tab</kbd> | Cycle the [permission mode](/docs/ai/code/permissions): `read-only` → `accept-edits` → `bypass-permissions` → `plan`. |
| <kbd>?</kbd> | Toggle the shortcuts overlay (at an empty prompt). |
| <kbd>/</kbd> | Open the [slash command](/docs/ai/code/slash-commands) palette. |
| <kbd>@</kbd> | Open the file picker to reference a file. |
| <kbd>!</kbd> | Enter shell mode (see below). |
| <kbd>Ctrl</kbd>+<kbd>O</kbd> | Expand or collapse the most recent collapsible block. |
| <kbd>Ctrl</kbd>+<kbd>R</kbd> | Toggle whether the transcript follows new output. In the model picker: refresh the model list. |
| <kbd>Ctrl</kbd>+<kbd>F</kbd> | Search the transcript. |
| <kbd>Ctrl</kbd>+<kbd>V</kbd> | Paste: attaches a clipboard image when one is present, otherwise pastes text. |
| <kbd>Ctrl</kbd>+<kbd>L</kbd> | Clear and redraw the screen. |
| <kbd>PgUp</kbd> / <kbd>PgDn</kbd> | Scroll the transcript half a screen. |
| <kbd>Ctrl</kbd>+<kbd>Home</kbd> / <kbd>Ctrl</kbd>+<kbd>End</kbd> | Jump to the top / bottom of the transcript while scrolled. |

Interrupting a turn restores your last message to the composer so you can edit and resend it. If you had messages queued, they are discarded instead, with a notice.

## Shell Mode

Start a message with <kbd>!</kbd> to run a shell command yourself, without involving the model. The composer's prompt glyph switches to `!` and a hint appears: **enter runs it locally; output is added to the conversation**.

<TerminalWindow>
  <TermComposer shell>git log --oneline -5</TermComposer>
</TerminalWindow>

The command runs in your login shell in the workspace directory. Because you typed it yourself, it bypasses the agent's [permission system](/docs/ai/code/permissions) entirely. The command and its output are recorded into the conversation as context, so the agent can refer to them on its next turn, but running a `!` command does **not** start a model turn; the agent only sees the output the next time you send it a message.

Press <kbd>Esc</kbd> to interrupt a running command. Commands are limited to two minutes; a hung command is killed rather than freezing the session.

## File References

Type <kbd>@</kbd> followed by part of a file name to open the file picker, which fuzzy-matches against the workspace's files as you type. Use <kbd>↑</kbd>/<kbd>↓</kbd> to move, and <kbd>Tab</kbd> or <kbd>Enter</kbd> to insert the highlighted path. Selecting a directory keeps the picker open on that directory's contents so you can browse inward. Path-like queries such as `@~/Downloads/` or `@../` browse the filesystem directly, including outside the workspace.

When your message is sent:

- **Text files** referenced with `@` have their contents included with your message (workspace files only). The transcript shows just the `@` reference you typed.
- **Image paths** (`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`) are attached as images the model can see. These may point outside the workspace, e.g. `@~/Downloads/screenshot.png`.

## Pasting Images

Press <kbd>Ctrl</kbd>+<kbd>V</kbd> to paste an image from the clipboard. The image is attached and an `[Image #1]` placeholder is inserted into your message; deleting the placeholder before sending drops the attachment. If the model rejects image input, `pw code` tells you so you can remove the image or switch to a vision-capable model with `/model`.

:::note Over SSH
Inside an SSH session your local clipboard is unreachable, and `pw code` will say so. Copy the file to the remote machine (e.g. with `scp`) and attach it with `@path` instead.
:::

## Related Documentation

- [pw code Overview](/docs/ai/code): Feature overview and quick start
- [Slash Commands](/docs/ai/code/slash-commands): The `/` command palette
- [Permissions](/docs/ai/code/permissions): What the permission modes mean
- [Subagents](/docs/ai/code/subagents): The agent switcher and delegated tasks
- [Sessions & Resume](/docs/ai/code/sessions): The session picker
- [Settings](/docs/ai/code/settings): Auto-scroll, mouse clicks, and other preferences
- [Models & Allocations](/docs/ai/code/models): The model picker
