Add altClickForMouseEvents option for issue #5952

When enabled during mouse events mode, click/drag/move events require the alt
key while wheel events are unaffected. Selection stays enabled by default
and takes precedence over macOptionClickForcesSelection.

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-27 20:13:31 +00:00
co-authored by Daniel Imms
parent 95d9224b8c
commit fbb2a9710f
8 changed files with 75 additions and 9 deletions
+4 -2
View File
@@ -619,8 +619,10 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
// apply mouse event classes set by escape codes before terminal was attached
if (this.mouseStateService.areMouseEventsActive) {
this._selectionService.disable();
this.element.classList.add('enable-mouse-events');
if (!this.options.altClickForMouseEvents) {
this._selectionService.disable();
this.element.classList.add('enable-mouse-events');
}
} else {
this._selectionService.enable();
}