Overview
WezTerm provides comprehensive clipboard operations through key assignments, supporting both system clipboard and primary selection (on X11 and Wayland systems). You can copy and paste text, select text with the mouse or keyboard, and integrate with the system clipboard.Copying to Clipboard
CopyTo
Copy the current selection to a clipboard destination:Where to copy the selection:
'Clipboard'- Copy to the system clipboard'PrimarySelection'- Copy to the primary selection buffer (X11/Wayland)'ClipboardAndPrimarySelection'- Copy to both locations
PrimarySelection is supported on X11 and Wayland systems that support primary-selection-unstable-v1 protocolCopy (Deprecated Alias)
For backwards compatibility,Copy is an alias for CopyTo 'ClipboardAndPrimarySelection':
CopyTextTo
Copy specific text to the clipboard without requiring a selection:The text to copy to the clipboard
Where to copy the text
Pasting from Clipboard
PasteFrom
Paste text from a clipboard source:Where to paste from:
'Clipboard'- Paste from the system clipboard'PrimarySelection'- Paste from the primary selection buffer
Paste (Deprecated Alias)
For backwards compatibility,Paste is an alias for PasteFrom 'Clipboard':
PastePrimarySelection (Deprecated Alias)
Alias forPasteFrom 'PrimarySelection':
Text Selection
SelectTextAtMouseCursor
Start a text selection at the mouse cursor position:Selection granularity:
'Cell'- Select individual characters'Word'- Select whole words'Line'- Select entire lines'SemanticZone'- Select semantic zones (e.g., URLs, file paths)'Block'- Rectangular block selection
ExtendSelectionToMouseCursor
Extend the current selection to the mouse cursor:Selection mode to use when extending
ClearSelection
Clear the current text selection:CompleteSelection
Complete the selection and copy it to the clipboard:Where to copy the completed selection
CompleteSelectionOrOpenLinkAtMouseCursor
Complete the selection or open a URL if hovering over one:Where to copy the selection if not opening a link
Copy Mode
ActivateCopyMode
Enter copy mode for keyboard-driven text selection:Quick Select
QuickSelect
Activate quick select mode to select and copy patterns:QuickSelectArgs
Customize quick select behavior:Regular expressions to match. Defaults to
quick_select_patterns configCharacters to use for labels. Defaults to
quick_select_alphabet configAction to perform when a match is selected. Defaults to copying to clipboard
Label to show in place of “copy” when custom action is set
Number of lines before and after viewport to search
Complete Example
Related Actions
- Search Actions - Find and copy text from scrollback
- Scrolling Actions - Navigate through output before copying