Skip to content

Key Mapping

To customize key mappings, you need to configure input_mapping yaml entry

Defining input_mapping replaces the built-in bindings — it does not add to them

As soon as an input_mapping section is present in your contour.yml, Contour's built-in defaults (Ctrl+Shift+V, the Ctrl+Shift+P command palette, the tab shortcuts, …) are discarded, and only the entries you list are active. Writing an input_mapping section is a declaration that you are defining the full set of bindings.

The contour.yml that Contour generates on first run already contains every default binding written out in full, so editing that section keeps the defaults you did not touch. If you are writing a configuration by hand and want to keep the defaults, start from a generated one (contour generate config) and add your entries to the existing list.

Built-in bindings

A small number of bindings are built in and do not appear in input_mapping:

Binding Action
Ctrl+Tab / Ctrl+PageDown Switch to the tab on the right (wrapping around)
Ctrl+Shift+Tab / Ctrl+PageUp Switch to the tab on the left (wrapping around)
Ctrl+Shift+G (Linux, Windows) / Cmd+Shift+O (macOS) Open the last command's output in the pager named by command_blocks.pager (needs a shell that marks its commands with OSC 133). With nothing to open the chord is swallowed rather than sent to the shell as ^G; on the alternate screen it goes to the application
Ctrl+Shift+L (Linux, Windows) / Cmd+K (macOS) Clear the scrollback and the screen above the current prompt (ClearToPrompt). On the primary screen only; with nothing to clear the chord is swallowed rather than typed
Alt+Shift+Arrow (Linux, Windows) / Cmd+Option+Arrow (macOS) Move the focus to the pane on that side. Some desktops and keyboard-layout switchers grab Alt+Shift; if the chord never reaches Contour, bind another one to FocusPaneLeft/Right/Up/Down in input_mapping
Ctrl+Shift+E / Ctrl+Shift+O (Linux, Windows) Split the active pane side by side / stacked
Cmd+D / Cmd+Shift+D (macOS) Split the active pane side by side / stacked
Cmd+Shift+Enter (macOS) Zoom the active pane to fill the tab, and back
Ctrl+Shift+K (Linux, Windows) / Cmd+Shift+K (macOS) NewWindowTo: open the Connect picker to choose where a new window's sessions live
Right mouse button Open the terminal's context menu
Ctrl + triple-click with the Left mouse button Select the output of the command under the pointer (needs a shell that marks its commands with OSC 133; on the alternate screen, which has no commands, the click selects as usual)
Horizontal wheel / two-finger sideways swipe Switch tabs

The default chords added since your configuration was generated (see Default chords) reach it the same way, among them Ctrl+Shift+C, Ctrl+Shift+W, the pane chords and the macOS ⌘P, ⌘W and ⌃⌘ chords.

These are consulted only when your input_mapping does not claim the same key or button (for the triple-click, the same button and click count), so binding one of them yourself replaces it.

They are built in rather than listed as defaults for the reason given in the warning above: an input_mapping section replaces the built-in list wholesale, and the generated contour.yml writes every default into that section. A binding added to Contour after your configuration file was written would therefore be shadowed by your own file forever. Consulting these after yours is what lets a new binding still reach you, while anything you bind explicitly keeps winning.

Ctrl+Tab is taken from the application

Like Windows Terminal, GNOME Terminal and Konsole, Contour claims Ctrl+Tab for tab switching, so a terminal application that wants it (via the Kitty keyboard protocol) will not receive it. Bind it in your own input_mapping to give it back to the application.

Default chords

Every command with a default chord has one on Linux and Windows and on macOS. On macOS the application's chords are Command chords: a Ctrl+Shift+letter default answers to ⌘letter there (Primary, see below). Where macOS already gives the plain ⌘ chord another meaning, the Mac chord adds Shift or moves, and the table says why.

Command Linux / Windows macOS Note
Command palette (OpenCommandPalette) Ctrl+Shift+P ⌘P, ⇧⌘P ⇧⌘P for VS Code, Zed and Ghostty habits
Copy (CopySelection) Ctrl+Shift+C; Ctrl+C while selecting ⌘C
Paste (PasteClipboard) Ctrl+Shift+V ⌘V
Paste without control characters Ctrl+Alt+V ⌃⌘V Option composes characters on a Mac, so the Ctrl+Alt chords become ⌃⌘
New window (NewTerminal) Ctrl+Shift+N ⌘N
New window to… (NewWindowTo) Ctrl+Shift+K ⇧⌘K ⌘K clears to the prompt
New tab (CreateNewTab) Ctrl+Shift+T ⌘T
Close pane (ClosePane) Ctrl+Shift+W, Ctrl+Shift+X ⌘W Closes the tab with its last pane
Close tab (CloseTab) — ⇧⌘W On Linux and Windows, Ctrl+Shift already holds Shift
Select tab 1…9 (SwitchToTab) Alt+1 … Alt+9, Alt+0 for the tenth ⌘1 … ⌘9 ⌘0 resets the font size
Previous / next tab Ctrl+PageUp / Ctrl+PageDown, Ctrl+Shift+Tab / Ctrl+Tab, Shift+← / Shift+→ the same, and ⇧⌘[ / ⇧⌘]
Move tab left / right Ctrl+Shift+PageUp / PageDown ⌘PageUp / ⌘PageDown
Split side by side / stacked Ctrl+Shift+E / Ctrl+Shift+O ⌘D / ⇧⌘D iTerm2's chords
Focus the pane on that side Alt+Shift+Arrow ⌥⌘Arrow
Swap with the pane on that side Ctrl+Alt+Arrow ⌃⌥Arrow
Resize the pane Ctrl+Shift+Alt+Arrow ⌃⇧⌥Arrow
Zoom the pane (TogglePaneZoom) Ctrl+Shift+Z ⇧⌘↩ iTerm2's chord
Toggle split orientation Ctrl+Shift+\ ⌃⇧\
Find (SearchReverse) Ctrl+Shift+F ⌘F
Next / previous match F3 / Shift+F3 ⌘G / ⇧⌘G, and F3 / Shift+F3
Find the selection (SearchSelection) — ⌘E A macOS convention; Ctrl+Shift+E splits
Clear search highlight Ctrl+Shift+H ⇧⌘H ⌘H hides the application
Previous / next command (FocusPreviousCommand) Ctrl+↑ / Ctrl+↓ ⌘↑ / ⌘↓ At the prompt only, as in VS Code's terminal
Select previous / next command's output Ctrl+Shift+↑ / Ctrl+Shift+↓ ⇧⌘↑ / ⇧⌘↓ At the prompt only
Previous / next prompt (ScrollMarkUp) Ctrl+Alt+K / Ctrl+Alt+J ⌃⇧↑ / ⌃⇧↓ At the prompt only
Open the last command's output Ctrl+Shift+G ⇧⌘O ⌘G finds the next match
Clear to the prompt (ClearToPrompt) Ctrl+Shift+L ⌘K The shell's Ctrl+L, plus Shift
Open URLs by hint (HintMode) Ctrl+Shift+U ⌘U
Font size larger / smaller / reset Ctrl+Shift+= / Ctrl+Shift+- / Ctrl+0 ⌘+ / ⌘- / ⌘0
Toggle the status line Ctrl+Alt+. ⌃⌘.
Open the file manager Ctrl+Alt+O ⌃⌘O
Screenshot (ScreenshotVT) Ctrl+Alt+S ⌃⌘S
Toggle input method handling Ctrl+Alt+, ⌃⌘,
Settings (OpenConfiguration) Ctrl+Shift+, ⌘, (menu bar), ⌃⇧,
Vi normal mode Ctrl+Shift+Space ⌃⇧Space
Full screen Alt+Enter ⌥↩
Speak the selection Ctrl+Shift+S — macOS has its own Speak Selection (⌥Esc)
Quit Ctrl+Shift+Q ⌘Q (menu bar)

A test (ChordParity_test.cpp) keeps the two columns complete: a command bound on one platform only fails the build unless it is listed there with its reason.

macOS defaults

  • The menu bar provides ⌘Q (Quit) and ⌘, (Settings…), and ⌘H, ⌥⌘H and ⌘M; Contour binds none of them by default, so they never reach input_mapping. Ctrl+Shift+letter reaches the program in the terminal, and a ⌘ chord nothing is bound to is consumed rather than typed as its letter.
  • ⌘K clears to the prompt (ClearToPrompt) on the primary screen; in the alternate screen it is consumed, so a running vim or tmux is never reset. ClearHistoryAndReset has no macOS default.
  • Font size is on ⌘0, ⌘- and ⌘+ only; Ctrl+0 reaches the program.
  • ⌘X and ⌘S are deliberately unbound (a terminal cannot cut, and there is nothing to save).
  • The defaults that hang on Ctrl+Alt plus a character answer to ⌃⌘ on macOS instead, because Option composes characters there (see below).
  • ⌥← / ⌥→ move by word (ESC b / ESC f) outside the alternate screen, and ⌘← / ⌘→ / ⌘⌫ edit the line, so these shell conventions work out of the box. Inside the alternate screen ⌥← reaches the program as the Alt+Left it is (CSI 1;3D).

Option as Alt

Option has two jobs on a Mac: composing characters (⌥E then E gives é) and acting as Alt. The profile setting option_as_alt chooses which Option keys are Alt: off, left, right or both (true and false are still read as both and off). One rule applies everywhere:

  • An Option key that option_as_alt names is Alt, for every key: ⌥B sends ESC b, and an Alt+B binding fires.
  • An Option key it does not name composes on any key that has a composed character (⌥E, ⌥1 gives ¡) and is Alt only on keys that type nothing (arrows, Return, Backspace, the function keys), so ⌥← and Option+Enter keep working with option_as_alt: off.

Because of the second half, a binding of Alt plus a character cannot fire on an Option key that composes. Contour says so when it loads such a binding with option_as_alt set to off or to one side; bind the chord to Primary or Control instead, or name that side in option_as_alt.

Writing bindings

Each element in the input_mapping represents one key binding, whereas mods represents an array of keyboard modifiers that must be pressed - as well as the key or mouse - in order to activate the corresponding action. Additionally one can filter input mappings based on special terminal modes using the mode option:

  • Alt : The terminal is currently in alternate screen buffer, otherwise it is in primary screen buffer.
  • AppCursor : The application key cursor mode is enabled (otherwise it's normal cursor mode).
  • AppKeypad : The application keypad mode is enabled (otherwise it's the numeric keypad mode).
  • Select : The terminal has currently an active grid cell selection (such as selected text).
  • Insert : The Insert input mode is active, that is the default and one way to test that the input mode is not in normal mode or any of the visual select modes.
  • Search : A search term is currently set. It outlives the find bar, so this stays true for as long as the matches are still highlighted; an open bar with nothing typed into it does not match.
  • Trace : The terminal is currently in trace-mode, i.e., each VT sequence can be interactively single-step executed using custom actions. See TraceEnter/TraceStep/TraceLeave actions.

Every condition separated by | must match. Prefix a condition with ~ to require that mode to be inactive. For example, Insert|Select requires both Insert mode and a terminal selection. Omit mode to match regardless of the active modes.

To make Ctrl+V paste from the clipboard in Insert mode, including at a prompt with no selection, use the following entry under input_mapping.

- { mods: [Control], key: V, action: PasteClipboard, mode: Insert }

key represents keys on your keyboard, and mouse represents buttons as well as the scroll wheel.

Modifiers, which are case-insensitive (Control, control and CONTROL are the same modifier):

  • Shift
  • Alt
  • Control — may also be written Ctrl
  • Super — may also be written Meta. This is the Windows key on Windows, the Command key on macOS, and the Super key on anything else.
  • Hyper

Note

Meta is a synonym for Super for historical reasons: contour.yml has spelled the Windows/Command key Meta since before a separate Meta modifier existed. There is currently no configuration spelling for the distinct Meta modifier that the extended CSI u keyboard protocol reports.

  • Primary — the chord an application's own commands hang on: Command (Super) on macOS, Control + Shift everywhere else. One row mods: [Primary], key: C, action: CopySelection is therefore Ctrl+Shift+C on Linux and Windows and ⌘C on macOS, and Contour's built-in defaults are written that way. Primary can be combined with further modifiers ([Primary, Shift]), and the generated contour.yml spells it Primary wherever a default row uses it, so one file works on every machine you share it between.

An entry naming a modifier that is not in this list is rejected as a whole — the binding is dropped rather than bound with a partial chord — and the reason is reported on startup.

Keys can be expressed case-insensitively symbolic:

APOSTROPHE, ADD, BACKSLASH, COMMA, DECIMAL, DIVIDE, EQUAL, LEFT_BRACKET, MINUS, MULTIPLY, PERIOD, RIGHT_BRACKET, SEMICOLON, SLASH, SUBTRACT, SPACE Enter, Backspace, Tab, Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DownArrow, LeftArrow, RightArrow, UpArrow, Insert, Delete, Home, End, PageUp, PageDown, Numpad_Divide, Numpad_Multiply, Numpad_Subtract, Numpad_Add, Numpad_Decimal, Numpad_Enter, Numpad_Equal, Numpad_0, Numpad_1, Numpad_2, Numpad_3, Numpad_4, Numpad_5, Numpad_6, Numpad_7, Numpad_8, Numpad_9

or in case of standard characters, just the character.

A single-character key also matches case-insensitively: key: 'q' and key: 'Q' bind the same chord. Shift is carried by mods, not by the letter's case, so writing an uppercase letter does not mean "with Shift" — use mods: [Shift] for that.

Mouse buttons can be one of the following self-explanatory ones:

Left, Middle, Right, WheelUp, WheelDown, WheelLeft, WheelRight

A mouse binding may also name a click count with clicks (1 to 4). Such a binding fires on that click of a multi-click sequence only, and it is consulted before Contour's own double-, triple- and quadruple-click selection, so it replaces that selection for the chord it names:

input_mapping:
    - { mods: [Control], mouse: Left, clicks: 3, action: SelectCommandBlock, target: pointer, part: output }

A binding without clicks fires on every press that no clicks binding claimed. Like the selection it replaces, a clicks binding never takes a click that an application asked for, unless the bypass_mouse_protocol_modifier is held.

clicks applies to the Left, Middle and Right buttons only: a wheel step is never more than a first click. An entry that gives it to a key or a wheel, or a count other than 1 to 4, is dropped and the reason is reported on startup.

Switching daemons and workspaces

These actions re-point the window they fire in at another workspace or daemon (see Switching a window). None is bound by default; the command palette lists them under Daemons. They need a window that shows a daemon.

Action Key What it does
SwitchToWorkspace index: (1-based, required) Shows the Nth workspace of this window's daemon here.
OpenWorkspace index: (1-based, required) Shows it in a new window.
CycleWorkspace direction: next\|previous (default next) Shows the next or previous workspace of this window's daemon here, hidden and left ones included, in their position order.
CycleDaemon direction: next\|previous (default next) Shows the next or previous daemon here: the local daemons running, by label, then the saved hosts a window here shows.
SwitchToDaemon label: or host: (exactly one) Shows the named local daemon, or saved host, here.
OpenDaemon label: or host: (exactly one) Shows it in a new window.
input_mapping:
  - { mods: [Control, Alt], key: '2', action: SwitchToWorkspace, index: 2 }
  - { mods: [Control, Alt], key: RightArrow, action: CycleWorkspace, direction: next }
  - { mods: [Control, Alt, Shift], key: RightArrow, action: CycleDaemon, direction: next }
  - { mods: [Control, Alt], key: A, action: SwitchToDaemon, label: admin }
  - { mods: [Control, Alt], key: H, action: OpenDaemon, host: home }

The cycling actions never wait on a daemon: they step through what was last looked up, and look again in the background for the next press, so the first press after a change (or right after start-up) may still see the earlier list.

A binding that gives no index (or 0), an unknown direction, or neither or both of label and host is dropped, and the reason is reported on startup. Landing on a daemon with several workspaces opens the switcher popup on that daemon's workspaces, to pick one; Esc there cancels the switch and changes nothing.

Action What it does
ShowSwitcher Opens the daemon and workspace switcher popup over this window.
NewDaemon Asks for a label, starts a local daemon under it, and opens a new window on it.

The switcher popup lists the daemons under This computer (the local daemons running, by label) and Saved hosts. This window's daemon is expanded; Right expands any other one to its workspaces, each with its tab count and whether it is shown in this window, shown elsewhere, hidden or not shown, plus "+ new workspace on …". A saved host not connected yet says so, and is connected to when it is expanded or chosen. Typing filters the list, Return switches this window to the selected row, Shift+Return opens it in a new window, and Esc closes the popup without changing anything.

NewDaemon (also the popup's New daemon… row) refuses a label that cannot name a socket (letters, digits, -, _ and . only, not starting with a dot, at most 64 characters) right under the field; a label that is already running is offered as "Switch to daemon …" instead of starting a second one. The daemon it starts keeps running when its last window closes, like one started with contour daemon --label. List of supported actions for key mappings.

Action Description
CancelSelection Cancels currently active selection, if any.
ChangeProfile Changes the profile to the given profile name.
ClearHistoryAndReset Clears the history, performs a terminal hard reset and attempts to force a redraw of the currently running application.
CopyPreviousMarkRange Copies the most recent range that is delimited by vertical line marks into clipboard.
CopySelection Copies the current selection into the clipboard buffer. With fallback: last_command_output and nothing selected, copies what the last command printed instead (requires a shell that emits OSC 133 marks).
CreateDebugDump Create dump for debug purposes
CreateSelection Creates selection with custom delimiters configured via delimiters member.
DecreaseFontSize Decreases the font size by 1 pixel.
DecreaseOpacity Decreases the default-background opacity by 5%.
FocusNextSearchMatch Focuses the next search match (if any).
FocusPreviousSearchMatch Focuses the next previous match (if any).
FollowHyperlink Follows the hyperlink that is exposed via OSC 8 under the current cursor position.
HintMode Activates hint mode: scans the terminal for regex-matched patterns (URLs, file paths, git hashes, etc.), renders short alphabetic labels on each match, and lets the user type a label to act on that match (copy, open, paste). Parameter patterns selects which pattern set to use, hint_action specifies the action (Copy, Open, Paste, CopyAndPaste, Select), and scope selects how much to scan: Visible (the default, the current viewport) or Scrollback (the viewport plus up to hint_scrollback_lines rows of history, whose labels stay put while you scroll to reach them). A pattern that wraps across a line break is matched as one hint.
IncreaseFontSize Increases the font size by 1 pixel.
IncreaseOpacity Increases the default-background opacity by 5%.
NewTerminal Spawns a new terminal at the current terminals current working directory.
NewWindowTo Opens the Connect picker as a sheet: choose where the new window's sessions live (this computer's daemon, this window only, a saved host, or a typed ssh:// or tls:// address), then the window opens attached there.
NoSearchHighlight Disables current search highlighting, if anything is still highlighted due to a prior search.
OpenCommandPalette Opens the command palette: a searchable popup listing every runnable command with its description and key binding. Recently used commands are listed first, then all commands alphabetically.
OpenConfiguration Opens the Settings window (profiles, color schemes, global settings). Set in_editor: true on the binding to instead open the configuration file in an external editor.
OpenFileManager Opens the current working directory in a system file manager.
OpenSelection Open the current terminal selection with the default system application (eg; xdg-open)
PasteClipboard Pastes clipboard to standard input. Pass boolean parameter 'strip' to indicate whether or not to strip repetitive whitespaces down to one and newlines to whitespaces.
PasteSelection Pastes current selection to standard input.Option evaluate_in_shell specify if pasted text must be appended with linefeed and used as an input for the running shell
Quit Quits the application.
ReloadConfig Forces a configuration reload.
ResetConfig Overwrites current configuration with builtin default configuration and loads it. Attention, all your current configuration will be lost due to overwrite!
ResetFontSize Resets font size to what is configured in the config file.
ScreenshotVT Takes a screenshot in form of VT escape sequences.
SaveScreenshot Takes a screenshot and saves it into a file.
CopyScreenshot takes a screenshot and puts it into the system clipboard
CollapseAllFolds Collapses every finished command, hiding all of their output (requires shell integration)
CollapseLastFold Collapses the most recently finished command, hiding its output
ExpandAllFolds Expands every collapsed command again
ScrollDown Scrolls down by the multiplier factor.
ScrollMarkDown Scrolls one mark down (if none present, bottom of the screen)
ScrollMarkUp Scrolls one mark up
ScrollOneDown Scrolls down by exactly one line.
ScrollOneUp Scrolls up by exactly one line.
ScrollPageDown Scrolls a page down.
ScrollPageUp Scrolls a page up.
ScrollToBottom Scrolls to the bottom of the screen buffer.
ScrollToTop Scrolls to the top of the screen buffer.
ToggleFold Collapses or expands the command block the cursor is in
ToggleFoldAt Collapses or expands the command block covering a given grid line (used by the context menu)
ToggleLastFold Collapses or expands the most recently finished command
FocusPreviousCommand Focuses the command block before the focused one (else the last one in view), scrolls it into view and announces how it went.
FocusNextCommand Focuses the command block after the focused one (else the first one in view), scrolls it into view and announces how it went.
SelectPreviousCommandOutput Focuses the previous command block, as FocusPreviousCommand does, and selects its output.
SelectNextCommandOutput Focuses the next command block, as FocusNextCommand does, and selects its output.
OpenBlockMenu Opens the menu of the focused command block. Bind it with the BlockFocus mode, so the key keeps reaching the application otherwise.
ClearCommandBlockFocus Takes the keyboard focus off the command block. Bind it with the BlockFocus mode, so the key keeps reaching the application otherwise.
ScrollUp Scrolls up by the multiplier factor.
SearchReverse Opens the find bar, searching upwards from the current cursor position.
SearchSelection Searches for the selected text: its first line becomes the find bar's pattern, escaped when the bar searches by regular expression.
SendChars Writes given characters in chars member to the applications input.
ToggleAllKeyMaps Disables/enables responding to all keybinds (this keybind will be preserved when disabling all others).
ToggleFullscreen Enables/disables full screen mode.
ToggleInputMethodHandling Enables/disables IME (input method editor) handling.
ToggleInputProtection Enables/disables terminal input protection.
ToggleMouseForwarding Blocks/forwards mouse events to applications that track the mouse, until a profile switch or a configuration reload re-imposes the profile's mouse_forwarding.
ToggleStatusLine Shows/hides the VT320 compatible Indicator status line.
ToggleTitleBar Shows/Hides titlebar
TraceBreakAtEmptyQueue Executes any pending VT sequence from the VT sequence buffer in trace mode, then waits.
TraceEnter Enables trace mode, suspending execution until explicitly requested to continue (See TraceLeave and TraceStep).
TraceLeave Disables trace mode. Any pending VT sequence will be flushed out and normal execution will be resumed.
TraceStep Executes a single VT sequence that is to be executed next.
ViNormalMode Enters/Leaves Vi-like normal mode. The cursor can then be moved via h/j/k/l movements in normal mode and text can be selected via v, yanked via y, and clipboard pasted via p.
WriteScreen Writes VT sequence in chars member to the screen (bypassing the application).
CreateNewTab Creates a new tab in the terminal emulator.
CloseTab Closes current tab.
MoveTabTo Moves current tab to the given position (starting at number 1).
MoveTabToLeft Moves current tab to the left.
MoveTabToRight Moves current tab to the right.
SwitchToTab Switch to absolute tab position (starting at number 1)
SwitchToPreviousTab Switch to the previously focused tab
SwitchToTabLeft Switch to tab to the left
SwitchToTabRight Switch to tab to the right
SetTabTitle Rename the current tab inline (opens the tab-title editor)
SplitVertical Splits the active pane into two side-by-side panes (a vertical divider).
SplitHorizontal Splits the active pane into two stacked panes (a horizontal divider).
ClosePane Closes the active pane (or the tab if it is the last pane).
FocusPaneLeft Moves pane focus to the left.
FocusPaneRight Moves pane focus to the right.
FocusPaneUp Moves pane focus up.
FocusPaneDown Moves pane focus down.
SwapPaneLeft Swaps the active pane with its left neighbor.
SwapPaneRight Swaps the active pane with its right neighbor.
SwapPaneUp Swaps the active pane with its upper neighbor.
SwapPaneDown Swaps the active pane with its lower neighbor.
MovePaneLeft Moves the active pane past its left neighbor.
MovePaneRight Moves the active pane past its right neighbor.
MovePaneUp Moves the active pane past its upper neighbor.
MovePaneDown Moves the active pane past its lower neighbor.
ToggleSplitOrientation Flips the orientation of the active pane's split (horizontal <-> vertical).
TogglePaneZoom Zooms the active pane so it alone fills the tab, hiding its siblings; toggles back to the tiled layout. While zoomed, moving pane focus keeps the zoom and shows the newly focused pane.
ResizePane Grows or shrinks the active pane in the given direction (by an optional percent).
LaunchLayout Opens a named layout, appending its tabs to the current window.
SaveLayout Saves the current window's tabs as a named layout in layouts.yml. Without a name it opens a prompt to type one in (which is how the command palette offers it).
AttachToHost Opens a new window attached to the saved host name (see hosts:).
OpenContextMenu Opens the terminal pane's context menu. Bound to the right mouse button by default, and only fired when the running application has not asked for the mouse itself (hold Shift to open it anyway).
SelectAll Selects everything the terminal holds: the whole scrollback and the whole screen.
SoftReset Performs a terminal soft reset (DECSTR): resets modes, rendition and cursor state, while keeping the screen contents and the scrollback.
CopyLastCommandPrompt Copies the prompt line(s) of the most recently finished command into the clipboard. Requires a shell that emits OSC 133 marks (see Contour's shell integration).
CopyLastCommandOutput Copies what the most recently finished command printed into the clipboard. Requires a shell that emits OSC 133 marks (see Contour's shell integration).
CopyLastCommandBlock Copies both the prompt and the output of the most recently finished command into the clipboard. Requires a shell that emits OSC 133 marks (see Contour's shell integration).
CopyHyperlink Copies the URI of the hyperlink under the mouse cursor into the clipboard.
SetTabColor Colorize the current tab. Without a color, this opens the tab's color picker; with one (e.g. color: '#ff0000') it applies that color right away.
ResetTabColor Removes the color you gave the current tab, restoring its default look (or the color the running application assigned, if it assigned one).
CloseAllTabs Closes every tab in this window. With only one window open, that closes Contour.
SetTabBarVisibility Sets when this window's tab bar is shown (mode: always, never or multiple). Applies to this window until it is closed; the settings page is where the choice is made permanent.
SetTabBarPosition Places this window's tab bar above or below the terminal (position: top or bottom). Applies to this window until it is closed; the settings page is where the choice is made permanent.
SpeakSelection Reads the selected text aloud through the operating system's speech synthesizer. Available only where a speech engine and a voice are installed.
StopSpeaking Stops reading aloud.
SelectCommandBlock Selects one part of a command block as whole lines (target: pointer, cursor or last; part: output, input or all). Requires a shell that emits OSC 133 marks.
CopyCommandBlock Copies one part of a command block into the clipboard as plain text (target: pointer, cursor or last; part: output, input or all). Requires a shell that emits OSC 133 marks.
CopyCommandLine Copies the command line of a command block into the clipboard, with the control characters that would be unsafe to paste removed (target: pointer, cursor or last). Requires a shell that reports its command lines (OSC 133;C cmdline_url).
RerunCommand Runs the command line of a command block again: typed at the shell's prompt and entered, once the command it would run has been shown and confirmed (target: pointer, cursor or last). Requires a shell that marks its prompts (OSC 133) and reports or shows its command lines; refused while a command is running, and for a command line that cannot be typed as it is.
ToggleCommandFold Collapses or expands a command block's output (target: pointer, cursor or last). Requires a shell that emits OSC 133 marks, and folding to be enabled.
ClearToPrompt Clears the scrollback and the screen above the current prompt. A prompt on the screen moves to its top, with a running command's output; one in the scrollback becomes the oldest line kept. Requires a shell that emits OSC 133 marks.
OpenCommandOutput Opens a command's output in a pager (target: pointer, cursor or last; program: the pager, read as command_blocks.pager is, which it replaces when given; placement: split, tab or detached; format: sgr or plain, by default command_blocks.pager_format for the configured pager and sgr for a named program). Detached pipes plain text into the program's standard input instead of opening a pane, and is the one placement a daemon-attached session offers. Requires a shell that emits OSC 133 marks.
CloseOtherTabs Closes every tab in this window except the current one.
CloseTabsToRight Closes every tab to the right of the current one.
MoveTabToNewWindow Moves the current tab into a new window of its own. Does nothing with a single tab.
ShowAbout Shows the version of Contour.
MinimizeWindow Minimizes this window.
ZoomWindow Maximizes this window, or restores it when it is maximized (the macOS Zoom).
FocusNextArea Moves keyboard focus to the next area of the window: terminal, tabs, toolbar, and back.
FocusPreviousArea Moves keyboard focus to the previous area of the window: terminal, toolbar, tabs, and back.
FocusToolbar Moves keyboard focus to the window's toolbar.
SwitchToWorkspace Shows the workspace at the 1-based position index of this window's daemon in this window. Hidden workspaces are not counted. Does nothing for a window that runs its sessions in-process.
OpenWorkspace Shows the workspace at the 1-based position index of this window's daemon in a new window. Does nothing for a window that runs its sessions in-process.
CycleWorkspace Shows the next (direction: next, the default) or previous (direction: previous) workspace of this window's daemon in this window, wrapping around.
CycleDaemon Shows the next (direction: next, the default) or previous (direction: previous) daemon in this window: the local daemons by label, then the saved hosts some window shows; wrapping around.
SwitchToDaemon Shows the daemon named by label (a local daemon) or host (a saved host, see hosts:) in this window. A binding that names neither, or both, is dropped.
OpenDaemon Shows the daemon named by label (a local daemon) or host (a saved host, see hosts:) in a new window. A binding that names neither, or both, is dropped.
ShowSwitcher Opens the popup to switch this window to another daemon or workspace, or to open one in a new window.
NewDaemon Asks for a label, starts a new local daemon under it and shows it in this window.

Example of entries inside config file

 - { mods: [Control], key: Enter, action: CancelSelection }
 - { mods: [Control], key: Enter, action: ChangeProfile }
 - { mods: [Control], key: Enter, action: ClearHistoryAndReset }
 - { mods: [Control], key: Enter, action: CopyPreviousMarkRange }
 - { mods: [Control], key: Enter, action: CopySelection }
 - { mods: [Control], key: Enter, action: CreateDebugDump }
 - { mods: [Control], key: Enter, action: CreateSelection, delimiters: '' }
 - { mods: [Control], key: Enter, action: DecreaseFontSize }
 - { mods: [Control], key: Enter, action: DecreaseOpacity }
 - { mods: [Control], key: Enter, action: FocusNextSearchMatch }
 - { mods: [Control], key: Enter, action: FocusPreviousSearchMatch }
 - { mods: [Control], key: Enter, action: FollowHyperlink }
 - { mods: [Control], key: Enter, action: HintMode }
 - { mods: [Control], key: Enter, action: IncreaseFontSize }
 - { mods: [Control], key: Enter, action: IncreaseOpacity }
 - { mods: [Control], key: Enter, action: NewTerminal }
 - { mods: [Control], key: Enter, action: NewWindowTo }
 - { mods: [Control], key: Enter, action: NoSearchHighlight }
 - { mods: [Control], key: Enter, action: OpenCommandPalette }
 - { mods: [Control], key: Enter, action: OpenConfiguration }
 - { mods: [Control], key: Enter, action: OpenFileManager }
 - { mods: [Control], key: Enter, action: OpenSelection }
 - { mods: [Control], key: Enter, action: PasteClipboard }
 - { mods: [Control], key: Enter, action: PasteSelection }
 - { mods: [Control], key: Enter, action: Quit }
 - { mods: [Control], key: Enter, action: ReloadConfig }
 - { mods: [Control], key: Enter, action: ResetConfig }
 - { mods: [Control], key: Enter, action: ResetFontSize }
 - { mods: [Control], key: Enter, action: ScreenshotVT }
 - { mods: [Control], key: Enter, action: SaveScreenshot }
 - { mods: [Control], key: Enter, action: CopyScreenshot }
 - { mods: [Control], key: Enter, action: CollapseAllFolds }
 - { mods: [Control], key: Enter, action: CollapseLastFold }
 - { mods: [Control], key: Enter, action: ExpandAllFolds }
 - { mods: [Control], key: Enter, action: ScrollDown }
 - { mods: [Control], key: Enter, action: ScrollMarkDown }
 - { mods: [Control], key: Enter, action: ScrollMarkUp }
 - { mods: [Control], key: Enter, action: ScrollOneDown }
 - { mods: [Control], key: Enter, action: ScrollOneUp }
 - { mods: [Control], key: Enter, action: ScrollPageDown }
 - { mods: [Control], key: Enter, action: ScrollPageUp }
 - { mods: [Control], key: Enter, action: ScrollToBottom }
 - { mods: [Control], key: Enter, action: ScrollToTop }
 - { mods: [Control], key: Enter, action: ToggleFold }
 - { mods: [Control], key: Enter, action: ToggleFoldAt, line: 0 }
 - { mods: [Control], key: Enter, action: ToggleLastFold }
 - { mods: [Control], key: Enter, action: FocusPreviousCommand }
 - { mods: [Control], key: Enter, action: FocusNextCommand }
 - { mods: [Control], key: Enter, action: SelectPreviousCommandOutput }
 - { mods: [Control], key: Enter, action: SelectNextCommandOutput }
 - { mods: [Control], key: Enter, action: OpenBlockMenu }
 - { mods: [Control], key: Enter, action: ClearCommandBlockFocus }
 - { mods: [Control], key: Enter, action: ScrollUp }
 - { mods: [Control], key: Enter, action: SearchReverse }
 - { mods: [Control], key: Enter, action: SearchSelection }
 - { mods: [Control], key: Enter, action: SendChars }
 - { mods: [Control], key: Enter, action: ToggleAllKeyMaps }
 - { mods: [Control], key: Enter, action: ToggleFullscreen }
 - { mods: [Control], key: Enter, action: ToggleInputMethodHandling }
 - { mods: [Control], key: Enter, action: ToggleInputProtection }
 - { mods: [Control], key: Enter, action: ToggleMouseForwarding }
 - { mods: [Control], key: Enter, action: ToggleStatusLine }
 - { mods: [Control], key: Enter, action: ToggleTitleBar }
 - { mods: [Control], key: Enter, action: TraceBreakAtEmptyQueue }
 - { mods: [Control], key: Enter, action: TraceEnter }
 - { mods: [Control], key: Enter, action: TraceLeave }
 - { mods: [Control], key: Enter, action: TraceStep }
 - { mods: [Control], key: Enter, action: ViNormalMode }
 - { mods: [Control], key: Enter, action: WriteScreen, chars: '' }
 - { mods: [Control], key: Enter, action: CreateNewTab }
 - { mods: [Control], key: Enter, action: CloseTab }
 - { mods: [Control], key: Enter, action: MoveTabTo, position: 0 }
 - { mods: [Control], key: Enter, action: MoveTabToLeft }
 - { mods: [Control], key: Enter, action: MoveTabToRight }
 - { mods: [Control], key: Enter, action: SwitchToTab, position: 0 }
 - { mods: [Control], key: Enter, action: SwitchToPreviousTab }
 - { mods: [Control], key: Enter, action: SwitchToTabLeft }
 - { mods: [Control], key: Enter, action: SwitchToTabRight }
 - { mods: [Control], key: Enter, action: SetTabTitle }
 - { mods: [Control], key: Enter, action: SplitVertical }
 - { mods: [Control], key: Enter, action: SplitHorizontal }
 - { mods: [Control], key: Enter, action: ClosePane }
 - { mods: [Control], key: Enter, action: FocusPaneLeft }
 - { mods: [Control], key: Enter, action: FocusPaneRight }
 - { mods: [Control], key: Enter, action: FocusPaneUp }
 - { mods: [Control], key: Enter, action: FocusPaneDown }
 - { mods: [Control], key: Enter, action: SwapPaneLeft }
 - { mods: [Control], key: Enter, action: SwapPaneRight }
 - { mods: [Control], key: Enter, action: SwapPaneUp }
 - { mods: [Control], key: Enter, action: SwapPaneDown }
 - { mods: [Control], key: Enter, action: MovePaneLeft }
 - { mods: [Control], key: Enter, action: MovePaneRight }
 - { mods: [Control], key: Enter, action: MovePaneUp }
 - { mods: [Control], key: Enter, action: MovePaneDown }
 - { mods: [Control], key: Enter, action: ToggleSplitOrientation }
 - { mods: [Control], key: Enter, action: TogglePaneZoom }
 - { mods: [Control], key: Enter, action: ResizePane, direction: Right, percent: 5 }
 - { mods: [Control], key: Enter, action: LaunchLayout, name: '' }
 - { mods: [Control], key: Enter, action: SaveLayout }
 - { mods: [Control], key: Enter, action: AttachToHost, name: '' }
 - { mods: [Control], key: Enter, action: OpenContextMenu }
 - { mods: [Control], key: Enter, action: SelectAll }
 - { mods: [Control], key: Enter, action: SoftReset }
 - { mods: [Control], key: Enter, action: CopyLastCommandPrompt }
 - { mods: [Control], key: Enter, action: CopyLastCommandOutput }
 - { mods: [Control], key: Enter, action: CopyLastCommandBlock }
 - { mods: [Control], key: Enter, action: CopyHyperlink }
 - { mods: [Control], key: Enter, action: SetTabColor }
 - { mods: [Control], key: Enter, action: ResetTabColor }
 - { mods: [Control], key: Enter, action: CloseAllTabs }
 - { mods: [Control], key: Enter, action: SetTabBarVisibility, mode: Always }
 - { mods: [Control], key: Enter, action: SetTabBarPosition, position: Top }
 - { mods: [Control], key: Enter, action: SpeakSelection }
 - { mods: [Control], key: Enter, action: StopSpeaking }
 - { mods: [Control], key: Enter, action: SelectCommandBlock, target: last, part: output }
 - { mods: [Control], key: Enter, action: CopyCommandBlock, target: last, part: output }
 - { mods: [Control], key: Enter, action: CopyCommandLine, target: last }
 - { mods: [Control], key: Enter, action: RerunCommand, target: last }
 - { mods: [Control], key: Enter, action: ToggleCommandFold, target: last }
 - { mods: [Control], key: Enter, action: ClearToPrompt }
 - { mods: [Control], key: Enter, action: OpenCommandOutput, target: last, placement: split }
 - { mods: [Control], key: Enter, action: CloseOtherTabs }
 - { mods: [Control], key: Enter, action: CloseTabsToRight }
 - { mods: [Control], key: Enter, action: MoveTabToNewWindow }
 - { mods: [Control], key: Enter, action: ShowAbout }
 - { mods: [Control], key: Enter, action: MinimizeWindow }
 - { mods: [Control], key: Enter, action: ZoomWindow }
 - { mods: [Control], key: Enter, action: FocusNextArea }
 - { mods: [Control], key: Enter, action: FocusPreviousArea }
 - { mods: [Control], key: Enter, action: FocusToolbar }
 - { mods: [Control], key: Enter, action: SwitchToWorkspace, index: 0 }
 - { mods: [Control], key: Enter, action: OpenWorkspace, index: 0 }
 - { mods: [Control], key: Enter, action: CycleWorkspace, direction: next }
 - { mods: [Control], key: Enter, action: CycleDaemon, direction: next }
 - { mods: [Control], key: Enter, action: SwitchToDaemon, label: '' }
 - { mods: [Control], key: Enter, action: OpenDaemon, label: '' }
 - { mods: [Control], key: Enter, action: ShowSwitcher }
 - { mods: [Control], key: Enter, action: NewDaemon }