Skip to main content

Overview

WezTerm supports customizable mouse bindings through the mouse_bindings configuration option. You can bind actions to mouse clicks, double-clicks, triple-clicks, and drag operations with modifier keys.

Basic Mouse Binding Configuration

Mouse Events

Mouse events consist of:
object
required
The mouse event to bind.
string
Optional modifier keys (CTRL, SHIFT, ALT, SUPER).
KeyAssignment
required
The action to perform.

Event Types

Down - Mouse button pressed:
Up - Mouse button released:
Drag - Mouse moved while button held:

Streak Values

  • streak = 1 - Single click
  • streak = 2 - Double click
  • streak = 3 - Triple click

Mouse Buttons

  • 'Left' - Left mouse button
  • 'Right' - Right mouse button
  • 'Middle' - Middle mouse button (wheel click)
  • 'WheelUp' - Scroll wheel up
  • 'WheelDown' - Scroll wheel down

Common Mouse Binding Examples

Select Word on Double Click

Select Line on Triple Click

Paste on Middle Click

Custom Scrolling

Mouse Reporting

WezTerm supports SGR mouse reporting for applications like vim and tmux. This is enabled by default.

Disable Mouse Reporting for Specific Programs

Holding SHIFT will bypass mouse reporting and allow terminal-level mouse actions.

Disabling Default Mouse Bindings

To disable a default mouse binding:

Advanced Examples

Context Menu on Right Click

Select with Alt+Click

Drag to Create New Window

Mouse Cursor Themes

Configure the mouse cursor appearance:

See Also