Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Terminals

In the app: Projects → project title → environment title → Terminals

An environment may contain several independent terminals. They share files and network namespace but have separate processes, input and bounded histories.

Everyday use

  • Select a terminal title to open it.
  • Open several terminal windows when following concurrent processes.
  • Rename or close terminals independently.
  • Use the terminal footer for copy, paste, file insertion and scroll mode.
  • Use configurable toolbar buttons for reviewed commands and terminal key combinations.

For every Codex, Claude or future integration selected in New terminal, the new terminal automatically receives a matching platform launch button. A terminal may select several integrations and then receives one button for each. The button uses the launch command from that exact adapter descriptor. For example, Codex starts with the CAU profile selected by the installed adapter instead of a version-specific command copied into the UI. A button appears while the integration is awaiting its first real trust event as well as after it becomes active; it disappears if that integration was not selected for this terminal or is disabled. Private and workspace buttons remain separately configurable.

In a modal action dialog, such as New terminal or Run command, plain Enter runs the single visible primary action. Enter still inserts a newline in multiline editors. If a dialog deliberately presents several equally applicable primary actions, choose one explicitly instead of having the app guess.

Terminal windows float over the environment view, so you can switch to Files or Git without closing the terminal. Use the title-bar controls to minimize, maximize or restore a window. Drag and resize a restored window on larger screens. Its restored position and size are saved in this browser for the exact project, environment and terminal identifiers; another terminal cannot inherit them. Saved geometry is clamped to the current viewport and is not used on narrow mobile layouts. Minimize and maximize do not recreate the PTY or its display history. When several windows overlap, the first click on a background window’s Minimize, Restore or other title-bar action both brings that window forward and performs the requested action; an extra activation click is not required.

On a phone or tablet, the browser can dismiss its on-screen keyboard without fully releasing xterm’s input focus. Tap the live terminal surface to reopen the keyboard. If the browser does not react to that tap, use the keyboard button in the terminal footer. Both actions only restore input focus to the same terminal; they do not reconnect it, recreate the PTY or resend text.

Closing a browser window disconnects the view; it does not necessarily stop the terminal process. Stopping the environment closes all of its terminals. Typing exit, logout or end-of-file is different: after the provider confirms that the shell target ended, the terminal closes and disappears from the active list. A lost browser connection alone is never treated as shell exit.

If the live browser connection is interrupted while the window remains open, Code as Usual reconnects the view automatically with progressively slower retries. The terminal surface also shows a prominent Reconnect terminal action, so a user can retry immediately instead of waiting. The browser and server exchange a heartbeat while the terminal window exists; if a connection stops carrying replies, the browser replaces that transport in the background. The server-side session and its processes continue while the view is disconnected. Reconnect restores the view of that same terminal; it does not start a new shell. The reconnect action receives keyboard focus for the active terminal, so pressing Enter is equivalent to selecting the button. A disconnected background terminal does not take keyboard focus from another terminal where you are working. Returning to a visible tab or restoring network access triggers an immediate retry. Copyable terminal history remains available while disconnected.

Opening, reconnecting or resizing a terminal can make tmux redraw its current screen. Code as Usual covers that transient redraw with a Preparing terminal indicator and reveals xterm after the queued output has been processed and painted. When a terminal is opened, the quiet-period check starts only after the first terminal output has reached the browser; opening the connection alone does not remove the cover. This presentation step does not load or change tmux history, recreate the PTY or pause the program running in the terminal.

Create a terminal

Select New terminal, enter a name and optionally choose one of the terminal integrations made available by the workspace. The new terminal uses the same environment files, repositories, runtime packages and network policy. It does not create another environment.

Files in terminal input

Use Add file to upload a local file or choose an existing environment file. Code as Usual inserts the contained environment path into terminal input. It does not reinterpret the input as an AI prompt. The program running in the terminal decides how to use the path.

Clipboard images are stored under the environment’s upload area. They remain ordinary files and can be managed through Files.

Paths below files/ and repositories/ are recognized in terminal output as environment file links. This also works when a long path is visually wrapped, including an edge wrap emitted as a real newline without xterm’s usual wrap marker. Select a link to open the file in Files. Shift-click the link to copy its stable environment-relative form, for example files/my-files/test.txt, so it can be pasted into a terminal or prompt. The same form is available through Copy path in the Files action menu.

Ctrl+Shift+C copies selected terminal text. Ctrl+Shift+V (or the platform’s normal terminal paste shortcut) follows the browser and xterm native paste event once. Code as Usual does not issue a second programmatic paste for the same keyboard shortcut. The footer’s explicit Paste action remains useful when browser clipboard permission or an image/PDF clipboard item requires the richer clipboard API.

Scroll mode

Enable scroll mode from the terminal footer to inspect older terminal output. Disable it before resuming normal interactive input. Terminal history is bounded; durable information belongs in a file or source-control system. The History action captures the current bounded tmux history without changing the terminal. It is a viewing aid, not a permanent transcript or a replacement for application logs.

Scrolling upward with a mouse wheel or trackpad while the terminal is following ordinary live shell output opens the same copyable History view automatically. The first wheel movement is applied inside that snapshot, so the view does not briefly replay tmux history and jump back to the latest screen. Scrolling remains in tmux after explicit tmux scroll mode has been opened. When a full-screen program owns the terminal display and has enabled mouse reporting, the wheel gesture is sent to that program instead. If it owns the display without enabling mouse reporting, Code as Usual converts bounded wheel movement to Page Up or Page Down; it never converts it to the arrow keys used for prompt history. Codex, Claude Code and similar programs can therefore navigate their own conversation history, which does not exist in tmux’s captured scrollback. Return to the live terminal with the History button or the close action in the history header.

Some terminal programs use combinations that the browser reserves. For example, Codex can show its full transcript with Ctrl+T, while a browser normally opens a new tab for that combination.

Open the terminal toolbar settings, create a private button, and choose Send a terminal input sequence. Add a key step, enter T, select Ctrl, give the button a clear name such as Show full transcript, save it and add it to the terminal or environment toolbar. Selecting the resulting button sends the actual control character to the running terminal program; it does not invoke the browser shortcut.

The same builder can combine several ordered steps: printable text, ordinary keys and Enter, Tab, Escape, Backspace or Delete. Key steps may use Ctrl, Alt/Option and Shift when that combination has a stable terminal representation. This avoids separate built-in buttons for individual tools. The sequence describes bytes sent to a remote PTY, not physical operating-system keys, so a Mac Command key cannot be sent. For shifted punctuation, enter the resulting character directly.

If tmux scroll mode is active, a configured input button first returns the terminal to live mode and waits for confirmation before sending the sequence, so it is not consumed by the history viewer.