Skip to content

Keyboard and Commands ​

Documentation in progress

Some sections are still incomplete.

ThinkTerm adds very few keyboard shortcuts of its own. The keymap is WezTerm's, unchanged, and most of what ThinkTerm adds around the terminal — Spaces, Threads, the Live Overview, Remote Hosts — is reached with the mouse, the command palette or, on macOS, the menu bar. Any of those commands can be given a key in the config file.

The shortcuts ThinkTerm adds ​

ActionmacOSLinux and Windows
Open Settings⌘,Ctrl+Shift+,
Open or close the command palette⌘⇧PCtrl+Shift+P

Everything else is WezTerm's default keymap, listed on WezTerm's Default Key Assignments page: ⌘T for a new tab, ⌘W to close one, ⌘C and ⌘V, the font-size keys, and the rest. Ctrl+Shift+P opens the palette on macOS too, as it does in WezTerm.

thinkterm show-keys prints the keymap actually in force, with any keys of your own folded in. Setting disable_default_key_bindings = true removes ThinkTerm's two shortcuts along with WezTerm's — except the palette shortcut picked in Settings, described below, which works regardless.

What has no shortcut ​

There are no default keys for switching Spaces, Projects or Threads, for the sidebars, or for the Live Overview. They are reached this way instead:

ToUse
Go to any Thread, in any SpaceFind Thread at the bottom of the sidebar, or the palette's Find Thread group
Switch SpaceThe Space menu at the top of the sidebar, or the palette's Switch Space group
Make a new SpaceThe Space menu › New Space
Open the Live OverviewIts button at the bottom of the sidebar, Shell › Live Overview on macOS, or Live Overview in the palette
Open Remote HostsIts button at the bottom of the sidebar, Shell › Remote Hosts... on macOS, or the palette
Show or hide a sidebarThe sidebar buttons in the tab row
Rename a tabRename Tab… on the tab's right-click menu

The Live Overview, Remote Hosts, a new Space and renaming a tab each have an action you can bind to a key — see Binding ThinkTerm's actions. Going to a particular Thread or Space has no action of its own, but the palette gets there from the keyboard: open it and type a few letters of the name, and with Search Inside Groups on, as it is by default, the search reaches into the Find Thread and Switch Space groups. Nothing shows or hides a sidebar from the keyboard; no action for it exists.

The command palette ​

⌘⇧P (Ctrl+Shift+P on Linux and Windows) opens the command palette, and so does Edit › Activate Command Palette on macOS. It lists every command ThinkTerm and WezTerm have, with its key if it has one, and narrows as you type. Pressing the shortcut again, Escape, Ctrl+G or a click outside closes it.

Two other places open it part-way in. The Find Thread button at the bottom of the sidebar opens it inside the Find Thread group, and clicking Effective Color Scheme in Settings › Appearance opens it inside Change Theme. Backing out of either lands in the full list.

Choosing its shortcut ​

Settings › Command Palette has four rows:

SettingWhat it does
ShortcutThe chord that opens and closes the palette: ⌘ ⇧ P (the default), ⌘ P, ⌘ K or ⌃ ⇧ P
Visible RowsHow many results show before the list scrolls. Auto, the default, fits the window; otherwise 1 to 30
Font SizeThe palette's text size, 8 to 32 points. Reset goes back to command_palette_font_size from the config
Search Inside GroupsWhether a search at the top level also shows a few matches from inside the groups. On by default

Off macOS, ⌘ in those labels means the Super key, except in the default: ⌘ ⇧ P is Ctrl+Shift+P there, because the desktop usually keeps Super for itself.

The chord picked here is caught before the keymap is consulted, so it wins over whatever the chord did before. ⌘ K is the case to know: in WezTerm's keymap ⌘K clears the scrollback, and with ⌘ K picked it opens the palette instead. Clearing the scrollback stays in the palette, as Clear scrollback. The default chords are part of the keymap rather than this setting, so ⌘⇧P and Ctrl+Shift+P go on working whichever chord you pick. Because the choice is not in the keymap, thinkterm show-keys does not list it.

Keys inside the palette ​

KeyWhat it does
↑ ↓, or Ctrl+P and Ctrl+NMove the selection
Page Up, Page DownMove the selection a page
Home, EndWith the search empty, jump to the first or last entry; otherwise move the caret
EnterRun the selected command, or open the selected group
TabOpen the selected group
BackspaceWith the search empty inside a group, go back out of it, restoring the search and selection you left
Ctrl+UClear the search
Escape, Ctrl+G or the palette shortcutClose the palette
⌘A, ⌘C, ⌘X, ⌘VSelect all, copy, cut and paste in the search field. Ctrl on Linux and Windows
⌘← ⌘→, ⌘⌫Caret to the start or end, delete to the start. macOS
⌥← ⌥→, ⌥⌫Move or delete by word. Ctrl on Linux and Windows

Groups ​

Large families of commands are folded into groups, so that a thousand colour schemes do not bury the rest of the list. A group opens like a folder.

GroupWhat it holds
Find ThreadEvery saved Thread in every Space, under its Project, with the Space it belongs to on the right. Pinned Threads come first and Threads of archived Projects last, marked (Archived). A search matches the Thread, its Project, its Space and the folder's path. Choosing one switches Space first when it has to
Change ThemeEvery colour scheme, the built-in ones and any in your config's color_schemes, with Use configured default at the top. Moving the selection previews each scheme on the window; Enter applies it to every window and remembers it. Closing the palette any other way puts the colours back
Switch SpaceThe Spaces this window can show. It appears once there are three or more
Switch WorkspaceWezTerm's own multiplexer workspaces, other than the current one
New Tab in Domain, Attach Domain, Detach DomainThe multiplexer domains, as in WezTerm
LaunchThe entries of your launch_menu

The last five fold into a group only when they have three entries or more; with fewer, their commands sit in the main list. Once a search is two characters long, up to three matches from inside each group are listed after the direct matches, so typing a scheme's name finds it without opening Change Theme first. Search Inside Groups turns that off.

Find Thread is the only place that lists Threads outside the current Space, and archived ones; the sidebar shows one Space at a time.

Recents ​

The palette remembers what you run. Commands used often and recently sort to the top of the command list, below the groups, and inside Change Theme the schemes you choose move up the same way. The record is recent-commands.json in ThinkTerm's data directory — see Configuration for where that is — and it keeps up to 200 entries, dropping the least used first.

Commands of your own can be added with WezTerm's augment-command-palette event, as in WezTerm.

The macOS menus ​

ThinkTerm's own commands sit in the macOS menu bar beside WezTerm's:

MenuItemKey
ThinkTermAbout ThinkTerm
ThinkTermCheck for Updates... — opens Settings › Software Update
ThinkTermReload configuration⌘R
ThinkTermSettings...⌘,
ThinkTermHide Application⌘H
ThinkTermQuit ThinkTerm⌘Q
ThinkTermQuit and Stop Session Server — quits, and ends every terminal in the background session server
ShellLive Overview
ShellRemote Hosts...
ShellAdd Remote Host... — opens Remote Hosts on a blank host
EditActivate Command Palette⌘⇧P

Linux and Windows have no menu bar. There, the same commands are in the command palette under the same names, apart from About ThinkTerm, Hide Application and Quit ThinkTerm.

A few commands are in the palette only, with no menu item and no key:

CommandWhat it does
Archive Active WorkspaceArchives the Project you are in, closing its panes and keeping its Threads and layouts
Show Archived WorkspacesShows archived Projects at the bottom of the sidebar, until run again or the window closes
The Find Thread, Change Theme and Switch Space groupsAs above

In those two command names "workspace" means a Project, which is what the sidebar's menus call it. The Switch Workspace group is something else: WezTerm's multiplexer workspaces. Command names in the menu bar and the palette are in English whatever the interface language; the palette's group names follow it. Spaces, Projects and Threads covers archiving.

Binding ThinkTerm's actions ​

Keys are set in the config file's keys table, exactly as in WezTerm — see WezTerm's Key Binding page. ThinkTerm adds these actions to wezterm.action:

ActionWhat it does
OpenSettingsOpens Settings
CheckForUpdatesOpens Settings on the Software Update page
QuitAndStopSessionServerQuits ThinkTerm and stops the background session server, ending every terminal in it
ToggleLiveOverviewOpens or closes the Live Overview
OpenSshHostsOpens or closes Remote Hosts
AddRemoteHostOpens Remote Hosts on a blank host
CreateSpaceMakes a new Space, switches the window to it and opens its name for editing
ArchiveActiveProjectArchives the Project you are in, as Archive Active Workspace does
ToggleShowArchivedProjectsShows or hides archived Projects in the sidebar
PromptRenameTabOpens the current tab's name for editing
SpawnTabToRightOpens a new tab just to the right of the current one, in the domain given
SetColorSchemeSwitches the terminal's colour scheme by name, as Change Theme does, and remembers it
lua
local wezterm = require 'wezterm'
local act = wezterm.action
local config = wezterm.config_builder()

config.keys = {
  { key = 'o', mods = 'CMD|SHIFT', action = act.ToggleLiveOverview },
  { key = 'n', mods = 'CMD|ALT', action = act.CreateSpace },
  { key = 'r', mods = 'CMD|ALT', action = act.PromptRenameTab },
  { key = 't', mods = 'CMD|ALT', action = act.SpawnTabToRight 'CurrentPaneDomain' },
  { key = 'd', mods = 'CMD|ALT', action = act.SetColorScheme 'Dracula' },
}

return config

An action you bind also shows its key in the palette, and one that is not in the palette by default, such as PromptRenameTab, joins it once it has a key.

Escape and Enter ​

In the Live Overview, Escape closes it. When a card is asking whether to close its terminal, Escape answers no first, and a second press closes the overview.

When renaming in place — a Space, Project, Thread or tab, or a file in the Files panel — the name opens with all of it selected. Enter keeps the new name and Escape abandons it. Clicking anywhere else, or switching to another app, keeps it too, as Enter would. Inside the name, the copy, paste and caret keys are the same as in the palette's search field.

The Keymap page ​

Settings › Keymap has no controls yet: it shows a line of description and nothing to change. Keys are set in the config file, as above.

Keys elsewhere ​

  • The TUI has a keymap of its own, behind a Ctrl-b prefix — see TUI.
  • The browser page has its own keys and its own search shortcut — see Web.
  • The Notes editor's keys are described in Files and Notes.