Hook up vt extensions option

This commit is contained in:
Daniel Imms
2026-01-09 07:07:10 -08:00
parent 3fbaef06ef
commit 992da3cc4d
7 changed files with 66 additions and 10 deletions
+17
View File
@@ -231,6 +231,11 @@ declare module '@xterm/headless' {
* All features are disabled by default for security reasons.
*/
windowOptions?: IWindowOptions;
/**
* Enable various VT extensions. All extensions are disabled by default.
*/
vtExtensions?: IVtExtensions;
}
/**
@@ -313,6 +318,18 @@ declare module '@xterm/headless' {
buildNumber?: number;
}
/**
* Enable VT extensions that are not part of the core VT specification.
*/
export interface IVtExtensions {
/**
* Whether the kitty keyboard protocol is enabled. When enabled, the
* terminal will respond to keyboard protocol queries and allow programs to
* enable enhanced keyboard reporting. The default is false.
*/
kittyKeyboard?: boolean;
}
/**
* A replacement logger for `console`.
*/
+25 -6
View File
@@ -199,6 +199,12 @@ declare module '@xterm/xterm' {
*/
minimumContrastRatio?: number;
/**
* Controls the visibility and style of the overview ruler which visualizes
* decorations underneath the scroll bar.
*/
overviewRuler?: IOverviewRulerOptions;
/**
* Control various quirks features that are either non-standard or standard
* in but generally rejected in modern terminals.
@@ -284,6 +290,11 @@ declare module '@xterm/xterm' {
*/
theme?: ITheme;
/**
* Enable various VT extensions. All extensions are disabled by default.
*/
vtExtensions?: IVtExtensions;
/**
* Compatibility information when the pty is known to be hosted on Windows.
* Setting this will turn on certain heuristics/workarounds depending on the
@@ -313,12 +324,6 @@ declare module '@xterm/xterm' {
* All features are disabled by default for security reasons.
*/
windowOptions?: IWindowOptions;
/**
* Controls the visibility and style of the overview ruler which visualizes
* decorations underneath the scroll bar.
*/
overviewRuler?: IOverviewRulerOptions;
}
/**
@@ -430,6 +435,20 @@ declare module '@xterm/xterm' {
allowSetCursorBlink?: boolean;
}
/**
* Enable certain optional VT extensions.
*/
export interface IVtExtensions {
/**
* Whether the [kitty keyboard protocol][0] (`CSI u`) is enabled. When
* enabled, the terminal will respond to keyboard protocol queries and allow
* programs to enable enhanced keyboard reporting. The default is false.
*
* [0]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
*/
kittyKeyboard?: boolean;
}
/**
* Pty information for Windows.
*/