Keyboard shortcuts

In normal “character” mode most key-presses result in characters being send to the process (shell), but certain special key-combinations are handled specially. This is covered here.

The line-editing mode has short-cuts suitable for editing text, while the read-only Paging mode mode has short-cuts useful for navigating around in the buffer, including making selections.

Ctrl+Shift+S (save-as-html)

Save the display to a file.

Ctrl+Shift+L (input-mode-cycle)

Cycle between the input modes: automatic, to line, to character, and back. The resulting mode is displayed temporarily.

Ctrl+Shift+M

Enter Paging mode.

Ctrl+Shift+F (find-text)
Cmdt+F (only macOS)

Search for text in the buffer, entering find-text mode.

Ctrl

Show a popup with useful information about version, mode, size, or other data. This is shown if you press and release the Ctrl key without pressing some other key. Easiest way to make the popup go away is to press Ctrl again.

F11 (toggle-fullscreen)

Toggle full-screen mode.

Shift+F11 (toggle-fullscreen-current-window)

(Not for Electron or Qt.) Toggle full-screen mode for the current sub-window.

Ctrl+Shift+F10 (except macOS) (focus-menubar)
Ctrl+F2 (only macOS)
F10 (only line-edit and view modes)

Open the first submenu of the menubar. You can use keyboard shortcuts to navigate between menu-items. To select an item, type Enter; to cancel type Escape.

Ctrl+Shift+I (except macOS) (toggle-developer-tools)
Alt+Cmd+I (only macOS)

Toggle Developer Window, useful for debugging or examining the state of the Document Object Model.

Ctrl+Shift+W (except macOS) (close-pane)
Cmd+W (only macOS)

Close the current pane (sub-window).

Ctrl+Shift+Q (except macOS) (quit-domterm)
Cmd+Q (only macOS)

Close all windows, and exit the domterm backend server. This kills any detached jobs.

Clipboard

Ctrl+Shift+C (except macOS) (copy-text)
Cmd+C (only macOS)
Ctrl+Insert

Copy the selection to the clipboard. It is copied as both plain text (text/plain) and formatted HTML (text/html) in case the receiving application can paste the latter. (Ctrl+C also works in line-editing mode.)

Ctrl+Shift+V (except macOS) (paste-text)
Cmd+V (only macOS)
Shift+Insert

Paste text from the clipboard. (Ctrl+V also works in line-editing mode.)

Ctrl+Shift+X (except macOS) (cut-text)
Cmd+X (only macOS)

“Cut”: Restricts the selection to the current input area, copies that restricted selection to the clipboard, and then deletes the restricted selection. (In character mode, the deletion is implemented by sending the appropriate number of Delete/Backspace characters to the application.)

After an input prompt, assumimg shell integration is active, the the following can also be used:

Ctrl+C (after input prompt, except macOS) (copy-text-maybe)

If there is a non-empty selection and this is not macOS and we are input-reading mode with shell integration, copy the selection to the clipboard. Otherwise, send Ctrl+C literally to the process (which traditionally interrupts it).

Ctrl+V (after input prompt, except macOS) (paste-text-maybe)

Paste text from the clipboard, assuming we are input-reading mode with shell integration. Otherwise send Ctrl+V literally to the process.

Scaling (zooming)

The following commands change the effective window scale by zooming in or out, relative to the window-scale setting. The entire top window is zoomed, icnluding sub-windows, titlebars, and menus (unless you’re using system titlebars or menus).

Ctrl+Shift+Plus (window-zoom-in)

Zoom in (makes text bigger).

Ctrl+Shift+Minus (window-zoom-out)
Ctrl+Minus

Zoom out (makes text smaller).

Ctrl+0 (window-zoom-reset)

“Un-zoom” to normal size, as specified by the window-scale setting.

The following commands change the effective pane scale by zooming in or out, relative to the pane-scale setting.

Alt+Ctrl+Shift+Plus (pane-zoom-in)

Zoom in (makes text bigger).

Alt+Ctrl+Shift+Minus (pane-zoom-out)
Alt+Ctrl+Minus

Zoom out (makes text smaller).

Alt+Ctrl+0 (pane-zoom-reset)

“Un-zoom” to normal size, as specified by the pane-scale setting multiplied by the effective window scale.

Scrolling

In paging and edit modes, these may be modified by a repeat count. Otherwise, count defaults to 1.

Ctrl+Shift+PageUp (except macOS) (scroll-page-up)
Shift+PageUp (only macOS)
Cmd+PageUp (only macOS)
Ctrl+Shift+PageDown (except macOS) (scroll-page-down)
Shift+PageDown (only macOS)
Cmd+PageDown (only macOS)

Scroll count “pages” up or down, respectively. (Specifically, the viewport height times count minus a height of one line.) (On Mac keyboards without PageUp or PageDown use Fn+Up or Fn+Down instead.)

Ctrl+Shift+Up (except macOS) (scroll-line-up)
Cmd+Up (only macOS)
Ctrl+Shift+Down (except macOS) (scroll-line-down)
Cmd+Down (only macOS)

Scroll count lines up or down, respectively.

Ctrl+Shift+Home (scroll-top)

Scroll to top.

Ctrl+Shift+End (scroll-bottom)

Scroll to bottom.

See also the bindings for View mode - Paging and Pausing mode.

Managing subwindows

The prefix key Ctrl+Shift+A when followed by some other key controls sessions and windows.

Ctrl+Shift+T

Create a new terminal in a new tab.

Ctrl+Shift+N

Create a new terminal in a new pane (sub-window). The new pane is create to the right or below the current pane, depending on space.

Ctrl+Shift+A Ctrl+Left

Create a new terminal pane to the left of the current one.

Ctrl+Shift+A Ctrl+Right

Create a new terminal pane to the right of the current one.

Ctrl+Shift+A Ctrl+Up

Create a new terminal pane above the current one.

Ctrl+Shift+A Ctrl+Down

Create a new terminal pane below the current one.

Ctrl+Shift+A Left

Select the previous pane or tab.

Ctrl+Shift+A Right

Select the next pane or tab.

Ctrl+Shift+A d

Detach from current session and close the (sub-)window.

Changing keybindings

You can override the keymap with the keymap.line-edit setting. This is a map from keystroke strings (quoted or unquoted, followed by an unquoted colon) to action names (quoted or unquoted strings). The entries are separated by semi-colons or newlines.

To enable “standard” handling of Ctrl+V for Paste and Ctrl+C for Copy (while still signalling interrupt when there is no selection) do:

keymap.master =
 | "Ctrl+C": copy-text-or-interrupt
 | "Ctrl+V": paste-text