Skip to main content
Copy mode allows you to select and copy text from your terminal using only the keyboard, with Vim-style navigation controls. This eliminates the need to reach for your mouse when selecting terminal output.

Activating Copy Mode

ActionKeybinding
Activate copy modeCtrl+Shift+X
When copy mode is active, the tab title is prefixed with “Copy Mode” and the terminal behavior changes to allow keyboard-driven cursor navigation.

Selection Modes

Copy mode supports three types of selection:
ModeKeybindingDescription
Cell selectionvSelect individual characters
Line selectionShift+VSelect entire lines
Rectangular selectionCtrl+VSelect a rectangular block
Selection mode is off by default. Press v to toggle it on before selecting text.

Basic Movement

ActionKeybindings
Move lefth, LeftArrow
Move downj, DownArrow
Move upk, UpArrow
Move rightl, RightArrow

Word Movement

ActionKeybindings
Forward one wordw, Alt+F, Alt+RightArrow, Tab
Backward one wordb, Alt+B, Alt+LeftArrow, Shift+Tab
Forward to word ende

Line Movement

ActionKeybindings
Start of line0, Home
End of line$, End
Start of next lineEnter
Start of indented line^, Alt+M

Viewport Movement

ActionKeybindings
Top of viewportShift+H
Middle of viewportShift+M
Bottom of viewportShift+L

Page Movement

ActionKeybindings
Up one screenPageUp, Ctrl+B
Down one screenPageDown, Ctrl+F
Up half screenCtrl+U
Down half screenCtrl+D

Scrollback Movement

ActionKeybindings
Top of scrollbackg (press twice)
Bottom of scrollbackShift+G

Selection Actions

Copying Text

ActionKeybinding
Copy and exity
Copy (without exit)Ctrl+Shift+C

Adjusting Selection

ActionKeybinding
Move to other end of selectiono
Move to other end horizontallyShift+O
Shift+O is particularly useful in rectangular selection mode for adjusting the selection boundary.

Exiting Copy Mode

ActionKeybindings
Exit copy modeEscape, Ctrl+C, Ctrl+G, q

Workflow Example

1

Activate copy mode

Press Ctrl+Shift+X to enter copy mode.
2

Navigate to start position

Use h, j, k, l or arrow keys to move the cursor to where you want to start selecting.
3

Start selection

Press v for character selection, Shift+V for line selection, or Ctrl+V for rectangular selection.
4

Extend selection

Move the cursor to the end of the text you want to select.
5

Copy and exit

Press y to copy the selected text and exit copy mode, or Ctrl+Shift+C to copy without exiting.

Customizing Copy Mode

You can customize copy mode keybindings by overriding the copy_mode key table:
Custom Copy Mode Bindings
local wezterm = require 'wezterm'
local act = wezterm.action
local config = {}

-- Get default key tables
config.key_tables = wezterm.gui.default_key_tables()

-- Customize specific bindings in copy_mode
table.insert(config.key_tables.copy_mode, {
  key = 'c',
  mods = 'CTRL',
  action = act.CopyMode 'Close',
})

return config

View Default Copy Mode Bindings

To see all default copy mode keybindings:
View Copy Mode Keys
wezterm show-keys --lua --key-table copy_mode

Color Customization

Customize the appearance of selected text in copy mode:
Copy Mode Colors
local wezterm = require 'wezterm'
local config = {}

config.colors = {
  copy_mode_active_highlight_bg = { Color = '#000000' },
  copy_mode_active_highlight_fg = { Color = '#ffffff' },
  copy_mode_inactive_highlight_bg = { Color = '#52ad70' },
  copy_mode_inactive_highlight_fg = { Color = '#c0c0c0' },
}

return config

Advanced Usage

Quick Copy Git Commit Hash

-- 1. Run git log
-- 2. Ctrl+Shift+X to enter copy mode  
-- 3. Navigate to the commit hash
-- 4. Press 'w' repeatedly to select the hash (moves word by word)
-- 5. Press 'v' to start selection
-- 6. Press 'e' to extend to end of word
-- 7. Press 'y' to copy

Selecting Command Output

Example Workflow
-- 1. Run a command that produces output
-- 2. Ctrl+Shift+X to enter copy mode
-- 3. 'gg' to go to top of scrollback
-- 4. Search forward for command prompt or output start
-- 5. 'V' for line selection mode
-- 6. 'j' or '}' to select lines
-- 7. 'y' to copy

Integration with Quick Select

While copy mode provides fine-grained control, Quick Select mode is better for quickly selecting common patterns like:
  • URLs
  • File paths
  • Git hashes
  • IP addresses
Use copy mode when you need:
  • Precise character-level selection
  • Multi-line selections
  • Rectangular selections
  • Vim-style navigation

Comparison to Other Tools

FeatureCopy Modetmux copy-modescreen copy mode
Vim-style navigation
Rectangular selection
Integrated search✓ (via Ctrl+Shift+F)
Works with mouse
No external multiplexer

Tips and Tricks

  1. Combine with search: Use Ctrl+Shift+F to search, then Ctrl+Shift+X to enter copy mode at the found location
  2. Use markers: Navigate to specific points quickly with Shift+H (top), Shift+M (middle), Shift+L (bottom)
  3. Rectangular mode for columns: Use Ctrl+V to select columnar data from command output
  4. Fast line grabbing: Shift+V then j/k for quick line-based selections
  5. Practice Vim motions: Copy mode is a great way to learn or practice Vim navigation if you’re new to it