Keyboard
A terminal’s keyboard belongs to the program running in it. Termina keeps its own commands to chords a shell does not use, and handles a few keys itself where every terminal does.
The full list of commands and their chords is on the Keybindings page. This page covers the rules behind them.
Chords that leave the shell its keys
- On Linux and Windows an application chord is
Ctrl+Shift+key, neverCtrl+key. The plain form belongs to the shell:Ctrl+Tis readline’s transpose,Ctrl+Wdeletes a word,Ctrl+Cis SIGINT,Ctrl+Vis literal-next. So New Tab isCtrl+Shift+T, Copy isCtrl+Shift+Cand Paste isCtrl+Shift+V. - On macOS it is
Cmd+key, because Cmd is not a key a shell ever sees:Cmd+T,Cmd+C,Cmd+V. - A few chords are the platform’s own. Settings is
Ctrl+,(Cmd+,on macOS). Zoom isCtrl+=,Ctrl+-andCtrl+0(Cmd+=,Cmd+-,Cmd+0). Full Screen isF11(Ctrl+Cmd+Fon macOS). Close Window isCtrl+Shift+Q, as in GNOME Terminal and Konsole (Cmd+Shift+Won macOS). - The chords work with the menu bar hidden. They are handled by the window, ahead of the terminal, not by the menus.
Every chord is declared once, with its menu item, so the menu, the palette and the reference can never advertise a chord that does nothing.
The command palette
Alt+X (Option+X on macOS) opens it. It is Emacs’s M-x, and the chord Editora’s palette uses.
- Type part of a name. “nw” finds New Window, “tab close” finds Close Tab with the words in either order, and “file new” reaches New Tab through the menu it lives in. The matched letters are shown in bold, and each row shows its chord.
- Everything is there: every menu command, every open tab by its title (with the chord that reaches it), every shell profile (“New Tab: zsh”), and every theme (“Theme: Clear Dark”).
- A command that cannot run right now is greyed, not hidden. Reopen Closed Tab, with nothing closed yet, stays in the list with the reason as its tooltip, and the cursor steps over it.
- A line under the list says what the highlighted command does, and a legend names the keys.
Enteror a click runs the command;Esccloses the palette.
The keys in it are the arrows and Emacs’s:
| Key | Does |
|---|---|
↑ ↓, Ctrl+P Ctrl+N | Move |
Ctrl+V / Alt+V | Page down / up |
Alt+< / Alt+> | First / last row |
Ctrl+G, Esc | Close |
The query field takes the Emacs editing keys: Ctrl+A, Ctrl+E, Ctrl+F, Ctrl+B, Alt+F,
Alt+B, Ctrl+D, Ctrl+K, Alt+D, Ctrl+W, Alt+W, Ctrl+Y and Ctrl+/.
Changing the palette’s chord
Settings → Terminal → Keyboard → Command palette shortcut: click the field and press the
new chord. It applies at once, and the View menu and the palette show whichever is in force.
Reset puts Alt+X back.
Two kinds of chord are refused, with the reason on the row:
- A bare key. A function key works on its own; any other key needs
Ctrl,AltorCmd, or the shell would lose it. Shift alone does not count, sinceShift+Xis a capital letter. - A chord another command already has. Only the first command on a chord would ever run, so the row names the command that has it.
If you use M-x inside the terminal, in Emacs for instance, move the palette to another chord:
while Alt+X opens the palette, it never reaches the program.
This is the only chord 0.10.0 can change. Rebinding other commands is not there yet.
The Keyboard Shortcuts reference
Help → Keyboard Shortcuts… (Ctrl+Shift+/, Cmd+/ on macOS) lists every chord the window
answers to, grouped by menu, with a search box. It is built from the window’s own binding table,
so it cannot list a chord that does not work. It also lists the keys and gestures the terminal
handles itself (below). Esc closes it.
Alt, Option and AltGr
- Alt is Meta by default.
Alt+FsendsESC f, which readline reads asM-f(forward a word), and the same goes forM-b,M-dand the rest. - On macOS, Option is Meta too, and the key is sent as itself. Option is normally a compose key
(Option+F types
ƒ), and Termina sendsESC f, not an escape followed byƒ. - Turn it off under Settings → Terminal → Input → Use Alt as Meta to let Alt or Option compose characters instead, which is what macOS Option normally does.
- AltGr is left alone. On Windows and Linux AltGr arrives as Ctrl+Alt, and layouts use it to
type
@,{and€. A character AltGr composes reaches the shell as that character. Ctrl+Alt+lettersends Meta plus the control byte, readline’sC-M-fandC-M-b, when the key is the plain letter and not an AltGr character. Like Meta, this needs Alt as Meta on.- Printable characters come from what the system composed, so dead keys and input methods work.
Keys the terminal handles itself
| Key | Does |
|---|---|
Shift+PageUp / Shift+PageDown | Scroll back / forward a page |
Shift+Home / Shift+End | Scroll to the top of the scrollback / to the bottom |
Shift+Insert | Paste |
Ctrl+Insert | Copy |
| Middle-click | Paste the clipboard |
Tab, Shift+Tab, Esc | Always go to the shell, never to the window |
- The four scrolling keys go to the program on the alternate screen. A full-screen program
such as
lesshas no scrollback behind it, and bindsShift+PageUpitself. - Middle-click pastes the clipboard, not the X11 primary selection, which JavaFX cannot read.
Escdoes not leave full screen. OnlyF11(Ctrl+Cmd+Fon macOS) does, soEscin vim leaves insert mode as it should.Ctrl+3throughCtrl+8send xterm’s control bytes, and the keypad arrows work with NumLock off.
The mouse gestures, such as Shift+drag to select inside a program that has the mouse, are on
Selection and the mouse.
Tabs from the keyboard
| Key | Does |
|---|---|
Alt+1 … Alt+8 (Cmd+1 … Cmd+8) | Go to that tab |
Alt+9 (Cmd+9) | Go to the last tab, however many are open |
Ctrl+Shift+] / Ctrl+Shift+[ (Cmd+Shift+] / Cmd+Shift+[) | Next / previous tab |
Ctrl+Shift+← / Ctrl+Shift+→ (Cmd+Shift+← / Cmd+Shift+→) | Move the tab left / right |
Ctrl+Shift+1 … Ctrl+Shift+9 (Cmd+Shift+1 … Cmd+Shift+9) | New tab with profile 1 to 9 |
A number past the last tab selects nothing, so that you do not land on the wrong tab. See Tabs and windows and Shell profiles.