Introduction
Key assignments in WezTerm allow you to bind keyboard shortcuts to specific actions. The key assignment system is highly flexible, supporting modifiers, key tables, and complex action sequences.Basic Key Binding
Key bindings are configured through thekeys table in your configuration file:
Key Assignment Structure
Each key binding consists of three components:The key to bind. Can be a letter, number, function key (F1-F24), or special key name
Modifier keys to require. Common modifiers include:
CTRL- Control keySHIFT- Shift keyALT- Alt/Option keySUPERorCMD- Windows/Command key
|, e.g., CTRL|SHIFTThe action to perform when the key combination is pressed
Key Assignment Categories
Key assignments are organized into several categories:Tab Management
Actions for creating, closing, and navigating between tabs:SpawnTab- Create new tabsActivateTab- Switch to specific tabsCloseCurrentTab- Close tabsMoveTab- Reorder tabs
Pane Management
Actions for splitting, resizing, and navigating panes:SplitHorizontal/SplitVertical- Split panesActivatePaneDirection- Navigate between panesAdjustPaneSize- Resize panesCloseCurrentPane- Close panes
Copy and Paste
Actions for clipboard operations:CopyTo- Copy selection to clipboardPasteFrom- Paste from clipboardSelectTextAtMouseCursor- Start text selection
Scrolling
Actions for scrolling through terminal output:ScrollByPage- Scroll by pagesScrollByLine- Scroll by linesScrollToTop/ScrollToBottom- Jump to extremesScrollToPrompt- Navigate by shell prompts
Search
Actions for searching terminal content:Search- Open search overlayActivateCopyMode- Enter copy mode for keyboard navigation
Multiple Actions
You can bind a single key combination to multiple actions using theMultiple action:
Disabling Default Bindings
To disable a default key binding without assigning a new action:Key Tables
Key tables allow you to create modal key binding modes, similar to vim:Special Keys
WezTerm supports a wide range of special keys:- Function keys:
F1throughF24 - Navigation:
UpArrow,DownArrow,LeftArrow,RightArrow,PageUp,PageDown,Home,End - Editing:
Insert,Delete,Backspace,Enter,Tab,Escape - Media keys:
VolumeUp,VolumeDown,VolumeMute,Play,Pause
Best Practices
You can view all active key bindings by pressing
CTRL+SHIFT+L (or your configured key) to open the command palette, then selecting “Show Launcher” → “Key Assignments”