Merge pull request #5953 from xtermjs/cursor/alt-click-for-mouse-events-5b17

Add altClickForMouseEvents option
This commit is contained in:
Daniel Imms
2026-05-28 06:35:56 -07:00
committed by GitHub
9 changed files with 314 additions and 15 deletions
+11
View File
@@ -136,6 +136,17 @@ declare module '@xterm/headless' {
*/
minimumContrastRatio?: number;
/**
* When enabled and the terminal is in mouse events mode, mouse click, drag,
* and move events are only sent to the underlying application when the alt
* key is held. The alt key is not included in the mouse reports sent to the
* application. Wheel events are not affected. This allows normal text
* selection by default while still supporting application mouse interaction
* and scrolling when holding alt. When enabled, this takes precedence over
* `macOptionClickForcesSelection`.
*/
mouseEventsRequireAlt?: boolean;
/**
* Whether to reflow the line containing the cursor when the terminal is
* resized. Defaults to false, because shells usually handle this
+11
View File
@@ -206,6 +206,17 @@ declare module '@xterm/xterm' {
*/
minimumContrastRatio?: number;
/**
* When enabled and the terminal is in mouse events mode, mouse click, drag,
* and move events are only sent to the underlying application when the alt
* key is held. The alt key is not included in the mouse reports sent to the
* application. Wheel events are not affected. This allows normal text
* selection by default while still supporting application mouse interaction
* and scrolling when holding alt. When enabled, this takes precedence over
* `macOptionClickForcesSelection`.
*/
mouseEventsRequireAlt?: boolean;
/**
* Control various quirks features that are either non-standard or standard
* in but generally rejected in modern terminals.