{{since('20200607-144723-74889cd4')}}

Copy mode allows you to make selections using the keyboard; no need to reach for your mouse or trackpad. Copy mode is similar to quick select mode but is geared up for describing selections based on keyboard control, whereas quick select mode is used to quickly select and copy commonly used patterns. The colors of the highlighted/selected text can be configured.

The ActivateCopyMode key assignment is used to enter copy mode; it is bound to CTRL-SHIFT-X by default.

When copy mode is activated, the title is prefixed with "Copy Mode" and the behavior of the tab is changed; keyboard input now controls the cursor and allows moving it through the scrollback, scrolling the viewport as needed, in a style similar to that of the Vim editor.

Move the cursor to the start of the region you wish to select and press v to toggle selection mode (it is off by default), then move the cursor to the end of that region. You can then use Copy (by default: CTRL-SHIFT-C) to copy that region to the clipboard.

Key Assignments

The default key assignments in copy mode are as follows:

ActionKey Assignment
Activate copy modeCtrl + Shift + X
Copy and exit copy modey
Exit copy modeEsc
Ctrl + C
Ctrl + G
q
Cell selectionv
Line selectionShift + V
Rectangular selectionCtrl + V {{since('20220624-141144-bd1b7c5d', inline=True)}}
Move LeftLeftArrow
h
Move DownDownArrow
j
Move UpUpArrow
k
Move RightRightArrow
l
Move forward one wordAlt + RightArrow
Alt + F
Tab
w
Move backward one wordAlt + LeftArrow
Alt + B
Shift + Tab
b
Move forward one word ende {{since('20230320-124340-559cb7b0', inline=True)}}
Move to start of this line0
Home
Move to start of next lineEnter
Move to end of this line$
End
Move to start of indented lineAlt + M
^
Move to bottom of scrollbackShift + G
Move to top of scrollbackg
Move to top of viewportShift + H
Move to middle of viewportShift + M
Move to bottom of viewportShift + L
Move up one screenPageUp
Ctrl + B
Move up half a screenCtrl + U {{since('20230320-124340-559cb7b0', inline=True)}}
Move down one screenPageDown
Ctrl + F
Move down half a screenCtrl + D {{since('20230320-124340-559cb7b0', inline=True)}}
Move to other end of the selectiono
Move to other end of the selection horizontallyShift + O (useful in Rectangular mode)

Configurable Key Assignments

{{since('20220624-141144-bd1b7c5d')}}

The key assignments for copy mode are specified by the copy_mode Key Table.

You may provide your own definition of this key table if you wish to customize it.

You may use wezterm.gui.default_key_tables to obtain the defaults and extend them. In earlier versions of wezterm there wasn't a way to override portions of the key table, only to replace the entire table.

The default configuration at the time that these docs were built (which may be more recent than your version of wezterm) is shown below.

You can see the configuration in your version of wezterm by running wezterm show-keys --lua --key-table copy_mode.

{% include "examples/default-copy-mode-key-table.markdown" %}