Mouse
Development reference · View source
Mouse support needs a terminal with mouse reporting and editor.mouse: true
(the default).
| Action | Effect |
|---|---|
| Click | Focus a pane and place the caret |
| Shift-click | Extend the selection |
| Ctrl-left-click in the native window (Cmd-left-click on macOS) | Follow the file path or web link under the pointer, like gf, including live terminal output |
| Drag | Select, entering Select mode |
| Drag past the top or bottom row | Scroll and keep extending |
| Wheel | Scroll the pane under the pointer |
| Drag a shared border | Resize the adjacent aligned panes; unequal spans resize their shared split |
| Alt-left-drag inside a pane | Rearrange panes using the pane drop outline |
| Shift-Alt-left-drag inside a pane | Extend the pane into neighbouring panes |
| Right-click a selection | Copy all selections to the system clipboard, like Space c y |
| Double-click a directory tree row | Toggle the directory or open the file, like Enter |
Pane move/extend gestures are configurable through
keys.pointer
. Defaults above are
unchanged. For terminals that reserve Shift for native selection, assign
pane-extend: [Ctrl-Alt-LeftDrag] under keys.pointer.
- Autoscroll follows visual rows, including soft wrapping and collapsed folds. Move back inside the pane or release the button to stop.
- Right-click copy leaves the selections alone and reports
right mouse click (yanked to system clipboard). The native window uses the same behavior for document and terminal-review selections; right-drag in PDF and image previews pans instead. - Character rule. The pointer names the character under it, not the gap before it, so a drag covers the characters it started and ended on, in either direction. Pressing past a line’s end places the caret on its last character, or past it in Insert mode, as keyboard motion does.
- Native link clicks. Ctrl-left-click (Cmd-left-click on macOS) uses the
clicked character, ignoring existing selections. It follows the same paths,
Markdown labels and heading links, and web URLs as
gfin document views and terminal panes. Live terminals stay in input mode; reviewed terminals use their frozen text. Supported wrapped terminal URLs resolve from any of their rows. This gesture, including its drag and release, is never sent to the child. Extra modifiers retain their ordinary mouse behavior; prompts and overlays keep ownership of input. The interaction line names the gesture and its result, such asCtrl-left-click (opened https://example.com in the default browser). - Terminal panes. A click focuses a live terminal in Insert mode; a reviewed terminal stays in Normal/review until a terminal insert key returns to the live screen. A left drag in review selects cells and enters Select mode, and right-click copies that selection. Clicking another pane focuses it in Normal mode. Dragging from a document press still selects and enters Select mode.
- Pointer coordinates go through the same fold- and wrap-aware rows used for drawing, so collapsed lines and wide Unicode glyphs never disagree.
- Passive pointer motion never clears key hints or status and does not redraw.
- Mouse capture is released on every exit and error path.
Native text selection. Capturing the mouse takes over the terminal’s own
text selection. To keep that instead, set editor.mouse: false and restart.