jesseduffield.lazygit/docs-master
Stefan Haller e81cfdba33 Add a keybinding for toggling mouse capture at runtime (%)
Some terminals provide a modifier key that bypasses mouse capture so
that text can be selected with the mouse and copied to the clipboard
(option in iTerm, shift in Ghostty), but others don't (e.g. the
terminals built into VS Code and Zed). In those, selecting text
requires setting gui.mouseEvents to false in the config file and back
again afterwards, which is inconvenient.

Add a global keybinding (% by default) that toggles mouse capture on
the fly. Like the whitespace toggle, it flips the in-memory config
value, so the toggled state lasts until the config file is changed and
reloaded.

The key needs to be free in every panel, and % is; as a plain rune it
also arrives reliably in every terminal on all platforms, and it can't
fire while typing in a text prompt, since editors consume plain runes.
An alt-based binding would have been more mnemonic, but doesn't reach
lazygit in the built-in terminals of VS Code and Zed on macOS (the
very terminals that need this feature) unless the option key is
configured to act as meta; and a ctrl-based binding would burn one of
the few remaining free ctrl keys, which are better saved for future
features that get used more frequently.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 17:21:18 +02:00
..
dev Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
keybindings Add a keybinding for toggling mouse capture at runtime (%) 2026-07-10 17:21:18 +02:00
Config.md Add a keybinding for toggling mouse capture at runtime (%) 2026-07-10 17:21:18 +02:00
Custom_Command_Keybindings.md Convert keybinding fields to Keybinding 2026-05-25 15:32:47 +02:00
Custom_Pagers.md Add a hint about how to use diff --color-words or --word-diff in lazygit 2026-07-10 15:43:28 +02:00
Fixup_Commits.md Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
Range_Select.md Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
README.md Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
Searching.md Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
Stacked_Branches.md Make copies of the docs and schema folders 2025-11-12 08:44:56 +01:00
Undoing.md Fix undo shortcut in Undoing.md 2026-05-26 09:45:41 +02:00