package ansi

Import Path
	github.com/charmbracelet/x/ansi (on go.dev)

Dependency Relation
	imports 21 packages, and imported by 5 packages

Involved Source Files ansi.go ascii.go background.go c0.go c1.go charset.go clipboard.go color.go ctrl.go cursor.go cwd.go Package ansi defines common ANSI escape sequences based on the ECMA-48 specs. All sequences use 7-bit C1 control codes, which are supported by most terminal emulators. OSC sequences are terminated by a BEL for wider compatibility with terminals. finalterm.go focus.go graphics.go hyperlink.go inband.go iterm2.go keypad.go kitty.go method.go mode.go mode_deprecated.go modes.go mouse.go notification.go palette.go parser.go parser_decode.go parser_handler.go parser_sync.go passthrough.go paste.go progress.go reset.go screen.go sgr.go status.go style.go termcap.go title.go truncate.go urxvt.go util.go wcwidth.go width.go winop.go wrap.go xterm.go
Package-Level Type Names (total 30, in which 29 are exported)
/* sort exporteds by: | */
ANSIMode represents an ANSI terminal mode. Mode returns the ANSI mode as an integer. ANSIMode : Mode const BDSM const BiDirectionalSupportMode const InsertReplaceMode const IRM const KAM const KeyboardActionMode const LineFeedNewLineMode const LNM const LocalEchoMode const ModeBiDirectionalSupport const ModeInsertReplace const ModeKeyboardAction const ModeLineFeedNewLine const ModeLocalEcho const ModeSendReceive const SendReceiveMode const SRM
ANSIStatusReport represents an ANSI terminal status report. StatusReport returns the status report identifier. ANSIStatusReport : StatusReport
Attr is a SGR (Select Graphic Rendition) style attribute.
BasicColor is an ANSI 3-bit or 4-bit color with a value from 0 to 15. RGBA returns the red, green, blue and alpha components of the color. It satisfies the color.Color interface. BasicColor : Color BasicColor : image/color.Color func Convert16(c color.Color) BasicColor const Black const Blue const BrightBlack const BrightBlue const BrightCyan const BrightGreen const BrightMagenta const BrightRed const BrightWhite const BrightYellow const Cyan const Green const Magenta const Red const White const Yellow const charm.land/lipgloss/v2.Black const charm.land/lipgloss/v2.Blue const charm.land/lipgloss/v2.BrightBlack const charm.land/lipgloss/v2.BrightBlue const charm.land/lipgloss/v2.BrightCyan const charm.land/lipgloss/v2.BrightGreen const charm.land/lipgloss/v2.BrightMagenta const charm.land/lipgloss/v2.BrightRed const charm.land/lipgloss/v2.BrightWhite const charm.land/lipgloss/v2.BrightYellow const charm.land/lipgloss/v2.Cyan const charm.land/lipgloss/v2.Green const charm.land/lipgloss/v2.Magenta const charm.land/lipgloss/v2.Red const charm.land/lipgloss/v2.White const charm.land/lipgloss/v2.Yellow
Cmd represents a sequence command. This is used to pack/unpack a sequence command with its intermediate and prefix characters. Those are commonly found in CSI and DCS sequences. Final returns the unpacked command byte of the CSI sequence. Intermediate returns the unpacked intermediate byte of the CSI sequence. An intermediate byte is in the range of 0x20-0x2F. This includes these characters from ' ', '!', '"', '#', '$', '%', '&', ”', '(', ')', '*', '+', ',', '-', '.', '/'. Zero is returned if the sequence does not have an intermediate byte. Prefix returns the unpacked prefix byte of the CSI sequence. This is always gonna be one of the following '<' '=' '>' '?' and in the range of 0x3C-0x3F. Zero is returned if the sequence does not have a prefix.
Color is a color that can be used in a terminal. ANSI (including ANSI256) and 24-bit "true colors" fall under this category. RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color. Each value ranges within [0, 0xffff], but is represented by a uint32 so that multiplying by a blend factor up to 0xffff will not overflow. An alpha-premultiplied color component c has been scaled by alpha (a), so has valid values 0 <= c <= a. BasicColor HexColor IndexedColor RGBColor TrueColor XRGBAColor XRGBColor github.com/charmbracelet/ultraviolet.BackgroundColorEvent github.com/charmbracelet/ultraviolet.CursorColorEvent github.com/charmbracelet/ultraviolet.ForegroundColorEvent github.com/lucasb-eyer/go-colorful.Color charm.land/lipgloss/v2.NoColor charm.land/lipgloss/v2.RGBColor *image.Uniform image/color.Alpha image/color.Alpha16 image/color.CMYK image/color.Color (interface) image/color.Gray image/color.Gray16 image/color.NRGBA image/color.NRGBA64 image/color.NYCbCrA image/color.RGBA image/color.RGBA64 image/color.YCbCr Color : image/color.Color func Style.BackgroundColor(c Color) Style func Style.ForegroundColor(c Color) Style func Style.UnderlineColor(c Color) Style
DECMode represents a private DEC terminal mode. Mode returns the DEC mode as an integer. DECMode : Mode const AltScreenBufferMode const AltScreenMode const AltScreenSaveCursorMode const AnyEventMouseMode const AutoWrapMode const BackarrowKeyMode const BracketedPasteMode const ButtonEventMouseMode const CursorEnableMode const CursorKeysMode const DECAWM const DECBKM const DECCKM const DECLRMM const DECNKM const DECOM const DECTCEM const FocusEventMode const GraphemeClusteringMode const HighlightMouseMode const InBandResizeMode const LeftRightMarginMode const LightDarkMode const ModeAltScreen const ModeAltScreenSaveCursor const ModeAutoWrap const ModeBackarrowKey const ModeBracketedPaste const ModeCursorKeys const ModeFocusEvent const ModeInBandResize const ModeLeftRightMargin const ModeLightDark const ModeMouseAnyEvent const ModeMouseButtonEvent const ModeMouseExtSgr const ModeMouseExtSgrPixel const ModeMouseExtUrxvt const ModeMouseExtUtf8 const ModeMouseHighlight const ModeMouseNormal const ModeMouseX10 const ModeNumericKeypad const ModeOrigin const ModeSaveCursor const ModeSynchronizedOutput const ModeTextCursorEnable const ModeUnicodeCore const ModeWin32Input const MouseAllMotionMode const MouseCellMotionMode const MouseHiliteMode const MouseMode const MouseSgrExtMode const NormalMouseMode const NumericKeypadMode const OriginMode const ReportFocusMode const SaveCursorMode const SgrExtMouseMode const SgrPixelExtMouseMode const SyncdOutputMode const SynchronizedOutputMode const TextCursorEnableMode const UnicodeCoreMode const UrxvtExtMouseMode const Utf8ExtMouseMode const Win32InputMode const X10MouseMode
DECStatusReport represents a DEC terminal status report. StatusReport returns the status report identifier. DECStatusReport : StatusReport
ExtendedColor is an ANSI 256 (8-bit) color with a value from 0 to 255. Deprecated: use [IndexedColor] instead.
Handler handles actions performed by the parser. It is used to handle ANSI escape sequences, control characters, and runes. Execute is called when a control character is encountered. HandleApc is called when an APC sequence is encountered. HandleCsi is called when a CSI sequence is encountered. HandleDcs is called when a DCS sequence is encountered. HandleEsc is called when an ESC sequence is encountered. HandleOsc is called when an OSC sequence is encountered. HandlePm is called when a PM sequence is encountered. HandleSos is called when a SOS sequence is encountered. Print is called when a printable rune is encountered. func (*Parser).SetHandler(h Handler)
HexColor is a [color.Color] that can be formatted as a hex string. Hex returns the hex representation of the color. If the color is invalid, it returns an empty string. RGBA returns the RGBA values of the color. String returns the color as a hex string. If the color is nil, an empty string is returned. HexColor : Color HexColor : expvar.Var HexColor : fmt.Stringer HexColor : image/color.Color
IndexedColor is an ANSI 256 (8-bit) color with a value from 0 to 255. RGBA returns the red, green, blue and alpha components of the color. It satisfies the color.Color interface. IndexedColor : Color IndexedColor : image/color.Color func Convert256(c color.Color) IndexedColor
Method is a type that represents the how the renderer should calculate the display width of cells. Cut the string, without adding any prefix or tail strings. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). Note that the [left] parameter is inclusive, while [right] isn't. DecodeSequence decodes the first ANSI escape sequence or a printable grapheme from the given data. It returns the sequence slice, the number of bytes read, the cell width for each sequence, and the new state. The cell width will always be 0 for control and escape sequences, 1 for ASCII printable characters, and the number of cells other Unicode characters occupy. It uses the uniseg package to calculate the width of Unicode graphemes and characters. This means it will always do grapheme clustering (mode 2027). Passing a non-nil [*Parser] as the last argument will allow the decoder to collect sequence parameters, data, and commands. The parser cmd will have the packed command value that contains intermediate and prefix characters. In the case of a OSC sequence, the cmd will be the OSC command number. Use [Cmd] and [Param] types to unpack command intermediates and prefixes as well as parameters. Zero [Cmd] means the CSI, DCS, or ESC sequence is invalid. Moreover, checking the validity of other data sequences, OSC, DCS, etc, will require checking for the returned sequence terminator bytes such as ST (ESC \\) and BEL). We store the command byte in [Cmd] in the most significant byte, the prefix byte in the next byte, and the intermediate byte in the least significant byte. This is done to avoid using a struct to store the command and its intermediates and prefixes. The command byte is always the least significant byte i.e. [Cmd & 0xff]. Use the [Cmd] type to unpack the command, intermediate, and prefix bytes. Note that we only collect the last prefix character and intermediate byte. The [p.Params] slice will contain the parameters of the sequence. Any sub-parameter will have the [parser.HasMoreFlag] set. Use the [Param] type to unpack the parameters. Example: var state byte // the initial state is always zero [NormalState] p := NewParser(32, 1024) // create a new parser with a 32 params buffer and 1024 data buffer (optional) input := []byte("\x1b[31mHello, World!\x1b[0m") for len(input) > 0 { seq, width, n, newState := DecodeSequence(input, state, p) log.Printf("seq: %q, width: %d", seq, width) state = newState input = input[n:] } DecodeSequenceInString decodes the first ANSI escape sequence or a printable grapheme from the given data. It returns the sequence slice, the number of bytes read, the cell width for each sequence, and the new state. The cell width will always be 0 for control and escape sequences, 1 for ASCII printable characters, and the number of cells other Unicode characters occupy. It uses the uniseg package to calculate the width of Unicode graphemes and characters. This means it will always do grapheme clustering (mode 2027). Passing a non-nil [*Parser] as the last argument will allow the decoder to collect sequence parameters, data, and commands. The parser cmd will have the packed command value that contains intermediate and prefix characters. In the case of a OSC sequence, the cmd will be the OSC command number. Use [Cmd] and [Param] types to unpack command intermediates and prefixes as well as parameters. Zero [Cmd] means the CSI, DCS, or ESC sequence is invalid. Moreover, checking the validity of other data sequences, OSC, DCS, etc, will require checking for the returned sequence terminator bytes such as ST (ESC \\) and BEL). We store the command byte in [Cmd] in the most significant byte, the prefix byte in the next byte, and the intermediate byte in the least significant byte. This is done to avoid using a struct to store the command and its intermediates and prefixes. The command byte is always the least significant byte i.e. [Cmd & 0xff]. Use the [Cmd] type to unpack the command, intermediate, and prefix bytes. Note that we only collect the last prefix character and intermediate byte. The [p.Params] slice will contain the parameters of the sequence. Any sub-parameter will have the [parser.HasMoreFlag] set. Use the [Param] type to unpack the parameters. Example: var state byte // the initial state is always zero [NormalState] p := NewParser(32, 1024) // create a new parser with a 32 params buffer and 1024 data buffer (optional) input := []byte("\x1b[31mHello, World!\x1b[0m") for len(input) > 0 { seq, width, n, newState := DecodeSequenceInString(input, state, p) log.Printf("seq: %q, width: %d", seq, width) state = newState input = input[n:] } Hardwrap wraps a string or a block of text to a given line length, breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. When preserveSpace is true, spaces at the beginning of a line will be preserved. This treats the text as a sequence of graphemes. StringWidth returns the width of a string in cells. This is the number of cells that the string will occupy when printed in a terminal. ANSI escape codes are ignored and wide characters (such as East Asians and emojis) are accounted for. Truncate truncates a string to a given length, adding a tail to the end if the string is longer than the given length. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). TruncateLeft truncates a string to a given length, adding a prefix to the beginning if the string is longer than the given length. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). Wordwrap wraps a string or a block of text to a given line length, not breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. Wrap wraps a string or a block of text to a given line length, breaking word boundaries if necessary. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. Method : github.com/charmbracelet/ultraviolet.WidthMethod func FirstGraphemeCluster[T](b T, m Method) (T, int) func github.com/charmbracelet/ultraviolet.(*StyledString).Lines(m Method) []uv.Line func github.com/charmbracelet/ultraviolet.(*TerminalRenderer).SetWidthMethod(method Method) func github.com/charmbracelet/ultraviolet.(*TerminalScreen).SetWidthMethod(method Method) const GraphemeWidth const WcWidth
Mode represents an interface for terminal modes. Modes can be set, reset, and requested. ( Mode) Mode() int ANSIMode DECMode func DECRPM(mode Mode, value ModeSetting) string func DECRQM(m Mode) string func DECRST(modes ...Mode) string func DECSET(modes ...Mode) string func ReportMode(mode Mode, value ModeSetting) string func RequestMode(m Mode) string func ResetMode(modes ...Mode) string func RM(modes ...Mode) string func SetMode(modes ...Mode) string func SM(modes ...Mode) string func Modes.Delete(mode Mode) func Modes.Get(mode Mode) ModeSetting func Modes.IsPermanentlyReset(mode Mode) bool func Modes.IsPermanentlySet(mode Mode) bool func Modes.IsReset(mode Mode) bool func Modes.IsSet(mode Mode) bool func Modes.PermanentlyReset(modes ...Mode) func Modes.PermanentlySet(modes ...Mode) func Modes.Reset(modes ...Mode) func Modes.Set(modes ...Mode)
Modes represents the terminal modes that can be set or reset. By default, all modes are [ModeNotRecognized]. Delete deletes a terminal mode. This has the same effect as setting the mode to [ModeNotRecognized]. Get returns the setting of a terminal mode. If the mode is not set, it returns [ModeNotRecognized]. IsPermanentlyReset returns true if the mode is set to [ModePermanentlyReset]. IsPermanentlySet returns true if the mode is set to [ModePermanentlySet]. IsReset returns true if the mode is set to [ModeReset] or [ModePermanentlyReset]. IsSet returns true if the mode is set to [ModeSet] or [ModePermanentlySet]. PermanentlyReset sets a terminal mode to [ModePermanentlyReset]. PermanentlySet sets a terminal mode to [ModePermanentlySet]. Reset sets a terminal mode to [ModeReset]. Set sets a terminal mode to [ModeSet].
ModeSetting represents a mode setting. IsNotRecognized returns true if the mode is not recognized. IsPermanentlyReset returns true if the mode is permanently reset. IsPermanentlySet returns true if the mode is permanently set. IsReset returns true if the mode is reset or permanently reset. IsSet returns true if the mode is set or permanently set. func Modes.Get(mode Mode) ModeSetting func DECRPM(mode Mode, value ModeSetting) string func ReportMode(mode Mode, value ModeSetting) string const ModeNotRecognized const ModePermanentlyReset const ModePermanentlySet const ModeReset const ModeSet
MouseButton represents the button that was pressed during a mouse message. String returns a string representation of the mouse button. MouseButton : expvar.Var MouseButton : fmt.Stringer func EncodeMouseButton(b MouseButton, motion, shift, alt, ctrl bool) (m byte) const MouseBackward const MouseButton1 const MouseButton10 const MouseButton11 const MouseButton2 const MouseButton3 const MouseButton4 const MouseButton5 const MouseButton6 const MouseButton7 const MouseButton8 const MouseButton9 const MouseForward const MouseLeft const MouseMiddle const MouseNone const MouseRelease const MouseRight const MouseWheelDown const MouseWheelLeft const MouseWheelRight const MouseWheelUp const github.com/charmbracelet/ultraviolet.MouseBackward const github.com/charmbracelet/ultraviolet.MouseButton10 const github.com/charmbracelet/ultraviolet.MouseButton11 const github.com/charmbracelet/ultraviolet.MouseForward const github.com/charmbracelet/ultraviolet.MouseLeft const github.com/charmbracelet/ultraviolet.MouseMiddle const github.com/charmbracelet/ultraviolet.MouseNone const github.com/charmbracelet/ultraviolet.MouseRight const github.com/charmbracelet/ultraviolet.MouseWheelDown const github.com/charmbracelet/ultraviolet.MouseWheelLeft const github.com/charmbracelet/ultraviolet.MouseWheelRight const github.com/charmbracelet/ultraviolet.MouseWheelUp
Param represents a sequence parameter. Sequence parameters with sub-parameters are packed with the HasMoreFlag set. This is used to unpack the parameters from a CSI and DCS sequences. HasMore unpacks the HasMoreFlag from the parameter. Param returns the unpacked parameter at the given index. It returns the default value if the parameter is missing.
Params represents a list of packed parameters. ForEach iterates over the parameters and calls the given function for each parameter. If a parameter is part of a sub-parameter, it will be called with hasMore set to true. Use def to set a default value for missing parameters. Param returns the parameter at the given index and if it is part of a sub-parameters. It falls back to the default value if the parameter is missing. If the index is out of bounds, it returns the default value and false. func ToParams(params []int) Params func (*Parser).Params() Params func ReadStyleColor(params Params, co *color.Color) int func github.com/charmbracelet/ultraviolet.ReadStyle(params Params, pen *uv.Style)
Parser represents a DEC ANSI compatible sequence parser. It uses a state machine to parse ANSI escape sequences and control characters. The parser is designed to be used with a terminal emulator or similar application that needs to parse ANSI escape sequences and control characters. See package [parser] for more information. Advance advances the parser using the given byte. It returns the action performed by the parser. Command returns the packed command of the last dispatched sequence. Use [Cmd] to unpack the command. Control returns the last dispatched sequence as a control code. Data returns the raw data of the last dispatched sequence. Param returns the parameter at the given index and falls back to the default value if the parameter is missing. If the index is out of bounds, it returns the default value and false. Params returns the list of parsed packed parameters. Parse parses the given dispatcher and byte buffer. Deprecated: Loop over the buffer and call [Parser.Advance] instead. Reset resets the parser to its initial state. Rune returns the last dispatched sequence as a rune. SetDataSize sets the size of the data buffer. This is used when constructing OSC, DCS, SOS, PM, and APC sequences. If size is less than or equal to 0, the data buffer is unlimited and will grow as needed. SetHandler sets the handler for the parser. SetParamsSize sets the size of the parameters buffer. This is used when constructing CSI and DCS sequences. State returns the current state of the parser. StateName returns the name of the current state. func GetParser() *Parser func NewParser() *Parser func DecodeSequence[T](b T, state byte, p *Parser) (seq T, width int, n int, newState byte) func DecodeSequenceWc[T](b T, state byte, p *Parser) (seq T, width int, n int, newState byte) func PutParser(p *Parser) func Method.DecodeSequence(data []byte, state byte, p *Parser) (seq []byte, width, n int, newState byte) func Method.DecodeSequenceInString(data string, state byte, p *Parser) (seq string, width, n int, newState byte)
RGBColor is a 24-bit color that can be used in the terminal. This can be used to represent RGB colors. B uint8 G uint8 R uint8 RGBA returns the red, green, blue and alpha components of the color. It satisfies the color.Color interface. RGBColor : Color RGBColor : image/color.Color
State represents the state of the ANSI escape sequence parser used by [DecodeSequence].
StatusReport represents a terminal status report. StatusReport returns the status report identifier. ANSIStatusReport DECStatusReport func DeviceStatusReport(statues ...StatusReport) string func DSR(status StatusReport) string
Style represents an ANSI SGR (Select Graphic Rendition) style. BackgroundColor appends the background color style attribute to the style. If c is nil, the default background color is used. Supports [BasicColor], [IndexedColor] (256-color), and [color.Color] (24-bit RGB). Blink appends the slow blink or no blink style attribute to the style. When v is true, text blinks slowly (less than 150 per minute). When false, blinking is disabled. Bold appends the bold or normal intensity style attribute to the style. You can use [Style.Normal] to reset to normal intensity. Conceal appends the conceal or no conceal style attribute to the style. When v is true, text is hidden/concealed. When false, concealment is disabled. DefaultBackgroundColor appends the default background color style attribute to the style. Deprecated: use [Style.BackgroundColor](nil) instead. DefaultForegroundColor appends the default foreground color style attribute to the style. Deprecated: use [Style.ForegroundColor](nil) instead. DefaultUnderlineColor appends the default underline color style attribute to the style. Deprecated: use [Style.UnderlineColor](nil) instead. Faint appends the faint or normal intensity style attribute to the style. You can use [Style.Normal] to reset to normal intensity. ForegroundColor appends the foreground color style attribute to the style. If c is nil, the default foreground color is used. Supports [BasicColor], [IndexedColor] (256-color), and [color.Color] (24-bit RGB). Italic appends the italic or no italic style attribute to the style. When v is true, text is rendered in italic. When false, italic is disabled. NoBlink appends the no blink style attribute to the style. Deprecated: use [Style.Blink](false) or [Style.RapidBlink](false) instead. NoConceal appends the no conceal style attribute to the style. Deprecated: use [Style.Conceal](false) instead. NoItalic appends the no italic style attribute to the style. Deprecated: use [Style.Italic](false) instead. NoReverse appends the no reverse style attribute to the style. Deprecated: use [Style.Reverse](false) instead. NoStrikethrough appends the no strikethrough style attribute to the style. Deprecated: use [Style.Strikethrough](false) instead. NoUnderline appends the no underline style attribute to the style. Deprecated: use [Style.Underline](false) instead. Normal appends the normal intensity style attribute to the style. This resets [Style.Bold] and [Style.Faint] attributes. RapidBlink appends the rapid blink or no blink style attribute to the style. When v is true, text blinks rapidly (150+ per minute). When false, blinking is disabled. Note that this is not widely supported in terminal emulators. Reset appends the reset style attribute to the style. This resets all formatting attributes to their defaults. Reverse appends the reverse or no reverse style attribute to the style. When v is true, foreground and background colors are swapped. When false, reverse video is disabled. Strikethrough appends the strikethrough or no strikethrough style attribute to the style. When v is true, text is rendered with a horizontal line through it. When false, strikethrough is disabled. String returns the ANSI SGR (Select Graphic Rendition) style sequence for the given style. Styled returns a styled string with the given style applied. The style is applied at the beginning and reset at the end of the string. Underline appends the underline or no underline style attribute to the style. When v is true, text is underlined. When false, underline is disabled. UnderlineColor appends the underline color style attribute to the style. If c is nil, the default underline color is used. Supports [BasicColor], [IndexedColor] (256-color), and [color.Color] (24-bit RGB). UnderlineStyle appends the underline style attribute to the style. Supports various underline styles including single, double, curly, dotted, and dashed. Style : expvar.Var Style : fmt.Stringer func NewStyle(attrs ...Attr) Style func Style.BackgroundColor(c Color) Style func Style.Blink(v bool) Style func Style.Bold() Style func Style.Conceal(v bool) Style func Style.DefaultBackgroundColor() Style func Style.DefaultForegroundColor() Style func Style.DefaultUnderlineColor() Style func Style.Faint() Style func Style.ForegroundColor(c Color) Style func Style.Italic(v bool) Style func Style.NoBlink() Style func Style.NoConceal() Style func Style.NoItalic() Style func Style.NoReverse() Style func Style.Normal() Style func Style.NoStrikethrough() Style func Style.NoUnderline() Style func Style.RapidBlink(v bool) Style func Style.Reset() Style func Style.Reverse(v bool) Style func Style.Strikethrough(v bool) Style func Style.Underline(v bool) Style func Style.UnderlineColor(c Color) Style func Style.UnderlineStyle(u Underline) Style
TrueColor is a 24-bit color that can be used in the terminal. This can be used to represent RGB colors. For example, the color red can be represented as: TrueColor(0xff0000) Deprecated: use [RGBColor] instead. RGBA returns the red, green, blue and alpha components of the color. It satisfies the color.Color interface. TrueColor : Color TrueColor : image/color.Color
Underline represents an ANSI SGR (Select Graphic Rendition) underline style.
UnderlineStyle represents an ANSI SGR (Select Graphic Rendition) underline style. Deprecated: use [Underline] instead.
XRGBAColor is a [color.Color] that can be formatted as an XParseColor rgba: string. See: https://linux.die.net/man/3/xparsecolor Color color.Color RGBA returns the RGBA values of the color. String returns the color as an XParseColor rgba: string. If the color is nil, an empty string is returned. XRGBAColor : Color XRGBAColor : expvar.Var XRGBAColor : fmt.Stringer XRGBAColor : image/color.Color
XRGBColor is a [color.Color] that can be formatted as an XParseColor rgb: string. See: https://linux.die.net/man/3/xparsecolor Color color.Color RGBA returns the RGBA values of the color. String returns the color as an XParseColor rgb: string. If the color is nil, an empty string is returned. XRGBColor : Color XRGBColor : expvar.Var XRGBColor : fmt.Stringer XRGBColor : image/color.Color
Package-Level Functions (total 221, in which 193 are exported)
ByteToGraphemeRange takes start and stop byte positions and converts them to grapheme-aware char positions. You can use this with [Truncate], [TruncateLeft], and [Cut].
CBT is an alias for [CursorBackwardTab].
CHA is an alias for [CursorHorizontalAbsolute].
CHT is an alias for [CursorHorizontalForwardTab].
CNL is an alias for [CursorNextLine].
Command packs a command with the given prefix, intermediate, and final. A zero byte means the sequence does not have a prefix or intermediate. Prefixes are in the range of 0x3C-0x3F that is one of `<=>?`. Intermediates are in the range of 0x20-0x2F that is anything in `!"#$%&'()*+,-./`. Final bytes are in the range of 0x40-0x7E that is anything in the range `@A–Z[\]^_`a–z{|}~`.
Convert16 converts a [color.Color] to a 16-color ANSI color. It will first try to find a match in the 256 xterm(1) color palette, and then map that to the 16-color ANSI palette.
Convert256 converts a [color.Color], usually a 24-bit color, to xterm(1) 256 color palette. xterm provides a 6x6x6 color cube (16 - 231) and 24 greys (232 - 255). We map our RGB color to the closest in the cube, also work out the closest grey, and use the nearest of the two based on the lightness of the color. Note that the xterm has much lower resolution for darker colors (they are not evenly spread out), so our 6 levels are not evenly spread: 0x0, 0x5f (95), 0x87 (135), 0xaf (175), 0xd7 (215) and 0xff (255). Greys are more evenly spread (8, 18, 28 ... 238).
CPL is an alias for [CursorPreviousLine].
CPR is an alias for [CursorPositionReport].
CUB is an alias for [CursorBackward].
CUD is an alias for [CursorDown].
CUF is an alias for [CursorForward].
CUP is an alias for [CursorPosition].
CursorBackward (CUB) returns a sequence for moving the cursor left n cells. # CSI n D See: https://vt100.net/docs/vt510-rm/CUB.html
CursorBackwardTab (CBT) returns a sequence for moving the cursor to the previous tab stop n times. Default is 1. CSI n Z See: https://vt100.net/docs/vt510-rm/CBT.html
CursorDown (CUD) returns a sequence for moving the cursor down n cells. CSI n B See: https://vt100.net/docs/vt510-rm/CUD.html
CursorForward (CUF) returns a sequence for moving the cursor right n cells. # CSI n C See: https://vt100.net/docs/vt510-rm/CUF.html
CursorHorizontalAbsolute (CHA) returns a sequence for moving the cursor to the given column. Default is 1. CSI n G See: https://vt100.net/docs/vt510-rm/CHA.html
CursorHorizontalForwardTab (CHT) returns a sequence for moving the cursor to the next tab stop n times. Default is 1. CSI n I See: https://vt100.net/docs/vt510-rm/CHT.html
CursorInformationReport (DECCIR) is the response to a cursor information report request. It reports the cursor position, visual attributes, and character protection attributes. It also reports the status of origin mode [DECOM] and the current active character set. The response is a list of values separated by a semicolon (;) character. DCS 1 $ u D ... D ST Where D is a decimal number representing a value. See: https://vt100.net/docs/vt510-rm/DECCIR.html
CursorLeft (CUB) returns a sequence for moving the cursor left n cells. CSI n D See: https://vt100.net/docs/vt510-rm/CUB.html Deprecated: use [CursorBackward] instead.
CursorNextLine (CNL) returns a sequence for moving the cursor to the beginning of the next line n times. CSI n E See: https://vt100.net/docs/vt510-rm/CNL.html
CursorPosition (CUP) returns a sequence for setting the cursor to the given row and column. Default is 1,1. CSI n ; m H See: https://vt100.net/docs/vt510-rm/CUP.html
CursorPositionReport (CPR) is a control sequence that reports the cursor's position. CSI Pl ; Pc R Where Pl is the line number and Pc is the column number. See also https://vt100.net/docs/vt510-rm/CPR.html
CursorPreviousLine (CPL) returns a sequence for moving the cursor to the beginning of the previous line n times. CSI n F See: https://vt100.net/docs/vt510-rm/CPL.html
CursorRight (CUF) returns a sequence for moving the cursor right n cells. CSI n C See: https://vt100.net/docs/vt510-rm/CUF.html Deprecated: use [CursorForward] instead.
CursorUp (CUU) returns a sequence for moving the cursor up n cells. CSI n A See: https://vt100.net/docs/vt510-rm/CUU.html
Cut the string, without adding any prefix or tail strings. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). This treats the text as a sequence of graphemes.
CutWc the string, without adding any prefix or tail strings. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). Note that the [left] parameter is inclusive, while [right] isn't, which is to say it'll return `[left, right)`. This treats the text as a sequence of wide characters and runes.
CUU is an alias for [CursorUp].
DA1 is an alias for [PrimaryDeviceAttributes].
DA2 is an alias for [SecondaryDeviceAttributes].
DA3 is an alias for [TertiaryDeviceAttributes].
DCH is an alias for [DeleteCharacter].
DECCIR is an alias for [CursorInformationReport].
Type Parameters: T: string | []byte DecodeSequence decodes the first ANSI escape sequence or a printable grapheme from the given data. It returns the sequence slice, the number of bytes read, the cell width for each sequence, and the new state. The cell width will always be 0 for control and escape sequences, 1 for ASCII printable characters, and the number of cells other Unicode characters occupy. It uses the uniseg package to calculate the width of Unicode graphemes and characters. This means it will always do grapheme clustering (mode 2027). Passing a non-nil [*Parser] as the last argument will allow the decoder to collect sequence parameters, data, and commands. The parser cmd will have the packed command value that contains intermediate and prefix characters. In the case of a OSC sequence, the cmd will be the OSC command number. Use [Cmd] and [Param] types to unpack command intermediates and prefixes as well as parameters. Zero [Cmd] means the CSI, DCS, or ESC sequence is invalid. Moreover, checking the validity of other data sequences, OSC, DCS, etc, will require checking for the returned sequence terminator bytes such as ST (ESC \\) and BEL). We store the command byte in [Cmd] in the most significant byte, the prefix byte in the next byte, and the intermediate byte in the least significant byte. This is done to avoid using a struct to store the command and its intermediates and prefixes. The command byte is always the least significant byte i.e. [Cmd & 0xff]. Use the [Cmd] type to unpack the command, intermediate, and prefix bytes. Note that we only collect the last prefix character and intermediate byte. The [p.Params] slice will contain the parameters of the sequence. Any sub-parameter will have the [parser.HasMoreFlag] set. Use the [Param] type to unpack the parameters. Example: var state byte // the initial state is always zero [NormalState] p := NewParser(32, 1024) // create a new parser with a 32 params buffer and 1024 data buffer (optional) input := []byte("\x1b[31mHello, World!\x1b[0m") for len(input) > 0 { seq, width, n, newState := DecodeSequence(input, state, p) log.Printf("seq: %q, width: %d", seq, width) state = newState input = input[n:] } This function treats the text as a sequence of grapheme clusters.
Type Parameters: T: string | []byte DecodeSequenceWc decodes the first ANSI escape sequence or a printable grapheme from the given data. It returns the sequence slice, the number of bytes read, the cell width for each sequence, and the new state. The cell width will always be 0 for control and escape sequences, 1 for ASCII printable characters, and the number of cells other Unicode characters occupy. It uses the uniseg package to calculate the width of Unicode graphemes and characters. This means it will always do grapheme clustering (mode 2027). Passing a non-nil [*Parser] as the last argument will allow the decoder to collect sequence parameters, data, and commands. The parser cmd will have the packed command value that contains intermediate and prefix characters. In the case of a OSC sequence, the cmd will be the OSC command number. Use [Cmd] and [Param] types to unpack command intermediates and prefixes as well as parameters. Zero [Cmd] means the CSI, DCS, or ESC sequence is invalid. Moreover, checking the validity of other data sequences, OSC, DCS, etc, will require checking for the returned sequence terminator bytes such as ST (ESC \\) and BEL). We store the command byte in [Cmd] in the most significant byte, the prefix byte in the next byte, and the intermediate byte in the least significant byte. This is done to avoid using a struct to store the command and its intermediates and prefixes. The command byte is always the least significant byte i.e. [Cmd & 0xff]. Use the [Cmd] type to unpack the command, intermediate, and prefix bytes. Note that we only collect the last prefix character and intermediate byte. The [p.Params] slice will contain the parameters of the sequence. Any sub-parameter will have the [parser.HasMoreFlag] set. Use the [Param] type to unpack the parameters. Example: var state byte // the initial state is always zero [NormalState] p := NewParser(32, 1024) // create a new parser with a 32 params buffer and 1024 data buffer (optional) input := []byte("\x1b[31mHello, World!\x1b[0m") for len(input) > 0 { seq, width, n, newState := DecodeSequenceWc(input, state, p) log.Printf("seq: %q, width: %d", seq, width) state = newState input = input[n:] } This function treats the text as a sequence of wide characters and runes.
DECRPM is an alias for [ReportMode].
DECRQM is an alias for [RequestMode].
DECRQPSR is an alias for [RequestPresentationStateReport].
DECRST is an alias for [ResetMode].
DECSCUSR is an alias for [SetCursorStyle].
DECSET is an alias for [SetMode].
DECSIN is a sequence for setting the icon name. This is an alias for [SetWindowTitle]("L;<name>"). See: EK-VT520-RM 5–134 https://vt100.net/dec/ek-vt520-rm.pdf
DECSLRM is an alias for [SetLeftRightMargins].
DECSTBM is an alias for [SetTopBottomMargins].
DECSWT is a sequence for setting the window title. This is an alias for [SetWindowTitle]("1;<name>"). See: EK-VT520-RM 5–156 https://vt100.net/dec/ek-vt520-rm.pdf
DECTABSR is an alias for [TabStopReport].
DECXCPR is an alias for [ExtendedCursorPositionReport].
DeleteCharacter (DCH) deletes n characters at the current cursor position. As the characters are deleted, the remaining characters move to the left and the cursor remains at the same position. Default is 1. CSI Pn P See: https://vt100.net/docs/vt510-rm/DCH.html
DeleteLine (DL) deletes n lines at the current cursor position. Existing lines are moved up. CSI Pn M See: https://vt100.net/docs/vt510-rm/DL.html
DesktopNotification sends a desktop notification based on the extensible OSC 99 escape code. OSC 99 ; <metadata> ; <payload> ST OSC 99 ; <metadata> ; <payload> BEL Where <metadata> is a colon-separated list of key-value pairs, and <payload> is the notification body. See: https://sw.kovidgoyal.net/kitty/desktop-notifications/
DeviceStatusReport (DSR) is a control sequence that reports the terminal's status. The terminal responds with a DSR sequence. CSI Ps n CSI ? Ps n If one of the statuses is a [DECStatus], the sequence will use the DEC format. See also https://vt100.net/docs/vt510-rm/DSR.html
DL is an alias for [DeleteLine].
DSR is an alias for [DeviceStatusReport].
ECH is an alias for [EraseCharacter].
ED is an alias for [EraseDisplay].
EL is an alias for [EraseLine].
EncodeMouseButton returns a byte representing a mouse button. The button is a bitmask of the following leftmost values: - The first two bits are the button number: 0 = left button, wheel up, or button no. 8 aka (backwards) 1 = middle button, wheel down, or button no. 9 aka (forwards) 2 = right button, wheel left, or button no. 10 3 = release event, wheel right, or button no. 11 - The third bit indicates whether the shift key was pressed. - The fourth bit indicates the alt key was pressed. - The fifth bit indicates the control key was pressed. - The sixth bit indicates motion events. Combined with button number 3, i.e. release event, it represents a drag event. - The seventh bit indicates a wheel event. - The eighth bit indicates additional buttons. If button is [MouseNone], and motion is false, this returns a release event. If button is undefined, this function returns 0xff.
Type Parameters: T: string | []byte Equal returns true if the given byte slices are equal.
EraseCharacter (ECH) returns a sequence for erasing n characters from the screen. This doesn't affect other cell attributes. Default is 1. CSI n X See: https://vt100.net/docs/vt510-rm/ECH.html
EraseDisplay (ED) clears the display or parts of the display. A screen is the shown part of the terminal display excluding the scrollback buffer. Possible values: Default is 0. 0: Clear from cursor to end of screen. 1: Clear from cursor to beginning of the screen. 2: Clear entire screen (and moves cursor to upper left on DOS). 3: Clear entire display which delete all lines saved in the scrollback buffer (xterm). CSI <n> J See: https://vt100.net/docs/vt510-rm/ED.html
EraseLine (EL) clears the current line or parts of the line. Possible values: 0: Clear from cursor to end of line. 1: Clear from cursor to beginning of the line. 2: Clear entire line. The cursor position is not affected. CSI <n> K See: https://vt100.net/docs/vt510-rm/EL.html
Execute is a function that "execute" the given escape sequence by writing it to the provided output writter. This is a syntactic sugar over [io.WriteString].
ExtendedCursorPositionReport (DECXCPR) is a control sequence that reports the cursor's position along with the page number (optional). CSI ? Pl ; Pc R CSI ? Pl ; Pc ; Pv R Where Pl is the line number, Pc is the column number, and Pv is the page number. If the page number is zero or negative, the returned sequence won't include the page number. See also https://vt100.net/docs/vt510-rm/DECXCPR.html
FinalTerm returns an escape sequence that is used for shell integrations. Originally, FinalTerm designed the protocol hence the name. OSC 133 ; Ps ; Pm ST OSC 133 ; Ps ; Pm BEL See: https://iterm2.com/documentation-shell-integration.html
FinalTermCmdExecuted returns an escape sequence that is used for shell integrations command executed marks. This is sent just before the start of the command output. This is an alias for FinalTerm("C").
FinalTermCmdFinished returns an escape sequence that is used for shell integrations command finished marks. If the command was sent after [FinalTermCmdStart], it indicates that the command was aborted. If the command was sent after [FinalTermCmdExecuted], it indicates the end of the command output. If neither was sent, [FinalTermCmdFinished] should be ignored. This is an alias for FinalTerm("D").
FinalTermCmdStart returns an escape sequence that is used for shell integrations command start marks. This is sent just after the end of the shell prompt, before the user enters a command. This is an alias for FinalTerm("B").
FinalTermPrompt returns an escape sequence that is used for shell integrations prompt marks. This is sent just before the start of the shell prompt. This is an alias for FinalTerm("A").
Type Parameters: T: string | []byte FirstGraphemeCluster returns the first grapheme cluster in the given string or byte slice, and its monospace display width.
GetParser returns a parser from a sync pool.
Hardwrap wraps a string or a block of text to a given line length, breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. When preserveSpace is true, spaces at the beginning of a line will be preserved. This treats the text as a sequence of graphemes.
HardwrapWc wraps a string or a block of text to a given line length, breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. When preserveSpace is true, spaces at the beginning of a line will be preserved. This treats the text as a sequence of wide characters and runes.
Type Parameters: T: string | []byte HasApcPrefix returns true if the given byte slice has an APC prefix.
Type Parameters: T: string | []byte HasCsiPrefix returns true if the given byte slice has a CSI prefix.
Type Parameters: T: string | []byte HasDcsPrefix returns true if the given byte slice has a DCS prefix.
Type Parameters: T: string | []byte HasEscPrefix returns true if the given byte slice has an ESC prefix.
Type Parameters: T: string | []byte HasOscPrefix returns true if the given byte slice has an OSC prefix.
Type Parameters: T: string | []byte HasPmPrefix returns true if the given byte slice has a PM prefix.
Type Parameters: T: string | []byte HasPrefix returns true if the given byte slice has prefix.
Type Parameters: T: string | []byte HasSosPrefix returns true if the given byte slice has a SOS prefix.
Type Parameters: T: string | []byte HasStPrefix returns true if the given byte slice has a ST prefix.
Type Parameters: T: string | []byte HasSuffix returns true if the given byte slice has suffix.
HorizontalPositionAbsolute (HPA) returns a sequence for moving the cursor to the given column. This has the same effect as [CUP]. Default is 1. CSI n \` See: https://vt100.net/docs/vt510-rm/HPA.html
HorizontalPositionRelative (HPR) returns a sequence for moving the cursor right n columns relative to the current position. This has the same effect as [CUP]. Default is 1. CSI n a See: https://vt100.net/docs/vt510-rm/HPR.html
HorizontalVerticalPosition (HVP) returns a sequence for moving the cursor to the given row and column. Default is 1,1. CSI n ; m f This has the same effect as [CursorPosition]. See: https://vt100.net/docs/vt510-rm/HVP.html
HPA is an alias for [HorizontalPositionAbsolute].
HPR is an alias for [HorizontalPositionRelative].
HVP is an alias for [HorizontalVerticalPosition].
ICH is an alias for [InsertCharacter].
IL is an alias for [InsertLine].
InBandResize encodes an in-band terminal resize event sequence. CSI 48 ; height_cells ; widht_cells ; height_pixels ; width_pixels t See https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
InsertCharacter (ICH) inserts n blank characters at the current cursor position. Existing characters move to the right. Characters moved past the right margin are lost. ICH has no effect outside the scrolling margins. Default is 1. CSI Pn @ See: https://vt100.net/docs/vt510-rm/ICH.html
InsertLine (IL) inserts n blank lines at the current cursor position. Existing lines are moved down. CSI Pn L See: https://vt100.net/docs/vt510-rm/IL.html
ITerm2 returns a sequence that uses the iTerm2 proprietary protocol. Use the iterm2 package for a more convenient API. OSC 1337 ; key = value ST Example: ITerm2(iterm2.File{...}) See https://iterm2.com/documentation-escape-codes.html See https://iterm2.com/documentation-images.html
KeyModifierOptions (XTMODKEYS) sets/resets xterm key modifier options. Default is 0. CSI > Pp m CSI > Pp ; Pv m If Pv is omitted, the resource is reset to its initial value. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_
KittyGraphics returns a sequence that encodes the given image in the Kitty graphics protocol. APC G [comma separated options] ; [base64 encoded payload] ST See https://sw.kovidgoyal.net/kitty/graphics-protocol/
KittyKeyboard returns a sequence to request keyboard enhancements from the terminal. The flags argument is a bitmask of the Kitty keyboard protocol flags. While mode specifies how the flags should be interpreted. Possible values for flags mask: 1: Disambiguate escape codes 2: Report event types 4: Report alternate keys 8: Report all keys as escape codes 16: Report associated text Possible values for mode: 1: Set given flags and unset all others 2: Set given flags and keep existing flags unchanged 3: Unset given flags and keep existing flags unchanged See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
LightDarkReport is a control sequence that reports the terminal's operating system light/dark color preference. CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
ModifyOtherKeys returns a sequence that sets XTerm modifyOtherKeys mode. The mode argument specifies the mode to set. 0: Disable modifyOtherKeys mode. 1: Enable modifyOtherKeys mode 1. 2: Enable modifyOtherKeys mode 2. CSI > 4 ; mode m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys Deprecated: use [SetModifyOtherKeys1] or [SetModifyOtherKeys2] instead.
MouseSgr returns an escape sequence representing a mouse event in SGR mode. CSI < Cb ; Cx ; Cy M CSI < Cb ; Cx ; Cy m (release) See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Mouse%20Tracking
MouseX10 returns an escape sequence representing a mouse event in X10 mode. Note that this requires the terminal support X10 mouse modes. CSI M Cb Cx Cy See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Mouse%20Tracking
MoveCursor (CUP) returns a sequence for setting the cursor to the given row and column. CSI n ; m H See: https://vt100.net/docs/vt510-rm/CUP.html Deprecated: use [CursorPosition] instead.
NewParser returns a new parser with the default settings. The [Parser] uses a default size of 32 for the parameters and 64KB for the data buffer. Use [Parser.SetParamsSize] and [Parser.SetDataSize] to set the size of the parameters and data buffer respectively.
NewStyle returns a new style with the given attributes. Attributes are SGR (Select Graphic Rendition) codes that control text formatting like bold, italic, colors, etc.
Notify sends a desktop notification using iTerm's OSC 9. OSC 9 ; Mc ST OSC 9 ; Mc BEL Where Mc is the notification body. See: https://iterm2.com/documentation-escape-codes.html
NotifyWorkingDirectory returns a sequence that notifies the terminal of the current working directory. OSC 7 ; Pt BEL Where Pt is a URL in the format "file://[host]/[path]". Set host to "localhost" if this is a path on the local computer. See: https://wezfurlong.org/wezterm/shell-integration.html#osc-7-escape-sequence-to-set-the-working-directory See: https://iterm2.com/documentation-escape-codes.html#:~:text=RemoteHost%20and%20CurrentDir%3A-,OSC%207,-%3B%20%5BPs%5D%20ST
PanDown is an alias for [ScrollUp].
PanUp is an alias for [ScrollDown].
Parameter packs an escape code parameter with the given parameter and whether this parameter has following sub-parameters.
PopKittyKeyboard returns a sequence to pop n number of flags from the terminal Kitty Keyboard stack. CSI < flags u See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
PrimaryDeviceAttributes (DA1) is a control sequence that reports the terminal's primary device attributes. CSI c CSI 0 c CSI ? Ps ; ... c If no attributes are given, or if the attribute is 0, this function returns the request sequence. Otherwise, it returns the response sequence. Common attributes include: - 1 132 columns - 2 Printer port - 4 Sixel - 6 Selective erase - 7 Soft character set (DRCS) - 8 User-defined keys (UDKs) - 9 National replacement character sets (NRCS) (International terminal only) - 12 Yugoslavian (SCS) - 15 Technical character set - 18 Windowing capability - 21 Horizontal scrolling - 23 Greek - 24 Turkish - 42 ISO Latin-2 character set - 44 PCTerm - 45 Soft key map - 46 ASCII emulation See https://vt100.net/docs/vt510-rm/DA1.html
PushKittyKeyboard returns a sequence to push the given flags to the terminal Kitty Keyboard stack. Possible values for flags mask: 0: Disable all features 1: Disambiguate escape codes 2: Report event types 4: Report alternate keys 8: Report all keys as escape codes 16: Report associated text CSI > flags u See https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
PutParser returns a parser to a sync pool. The parser is reset automatically.
QueryKeyModifierOptions (XTQMODKEYS) requests xterm key modifier options. Default is 0. CSI ? Pp m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_
ReadStyleColor decodes a color from a slice of parameters. It returns the number of parameters read and the color. This function is used to read SGR color parameters following the ITU T.416 standard. It supports reading the following color types: - 0: implementation defined - 1: transparent - 2: RGB direct color - 3: CMY direct color - 4: CMYK direct color - 5: indexed color - 6: RGBA direct color (WezTerm extension) The parameters can be separated by semicolons (;) or colons (:). Mixing separators is not allowed. The specs supports defining a color space id, a color tolerance value, and a tolerance color space id. However, these values have no effect on the returned color and will be ignored. This implementation includes a few modifications to the specs: 1. Support for legacy color values separated by semicolons (;) with respect to RGB, and indexed colors 2. Support ignoring and omitting the color space id (second parameter) with respect to RGB colors 3. Support ignoring and omitting the 6th parameter with respect to RGB and CMY colors 4. Support reading RGBA colors
REP is an alias for [RepeatPreviousCharacter].
RepeatPreviousCharacter (REP) repeats the previous character n times. This is identical to typing the same character n times. Default is 1. CSI Pn b See: ECMA-48 § 8.3.103.
ReportMode (DECRPM) returns a sequence that the terminal sends to the host in response to a mode request [DECRQM]. ANSI format: CSI Pa ; Ps ; $ y DEC format: CSI ? Pa ; Ps $ y Where Pa is the mode number, and Ps is the mode value. 0: Not recognized 1: Set 2: Reset 3: Permanent set 4: Permanent reset See: https://vt100.net/docs/vt510-rm/DECRPM.html
RequestClipboard returns a sequence for requesting the clipboard. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
RequestMode (DECRQM) returns a sequence to request a mode from the terminal. The terminal responds with a report mode function [DECRPM]. ANSI format: CSI Pa $ p DEC format: CSI ? Pa $ p See: https://vt100.net/docs/vt510-rm/DECRQM.html
RequestPresentationStateReport (DECRQPSR) requests the terminal to send a report of the presentation state. This includes the cursor information [DECCIR], and tab stop [DECTABSR] reports. Default is 0. Possible values: 0: Error, request ignored. 1: Cursor information report [DECCIR]. 2: Tab stop report [DECTABSR]. CSI Ps $ w See: https://vt100.net/docs/vt510-rm/DECRQPSR.html
RequestTermcap is an alias for [XTGETTCAP].
RequestTerminfo is an alias for [XTGETTCAP].
ResetClipboard returns a sequence for resetting the clipboard. This is equivalent to SetClipboard(c, ""). See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
ResetKeyModifierOptions resets xterm key modifier options. This is an alias for [KeyModifierOptions].
ResetMode (RM) or (DECRST) returns a sequence to reset a mode. The mode arguments are a list of modes to reset. If one of the modes is a [DECMode], the function will returns two escape sequences. ANSI format: CSI Pd ; ... ; Pd l DEC format: CSI ? Pd ; ... ; Pd l See: https://vt100.net/docs/vt510-rm/RM.html
RM is an alias for [ResetMode].
ScreenPassthrough wraps the given ANSI sequence in a DCS passthrough sequence to be sent to the outer terminal. This is used to send raw escape sequences to the outer terminal when running inside GNU Screen. DCS <data> ST Note: Screen limits the length of string sequences to 768 bytes (since 2014). Use zero to indicate no limit, otherwise, this will chunk the returned string into limit sized chunks. See: https://www.gnu.org/software/screen/manual/screen.html#String-Escapes See: https://git.savannah.gnu.org/cgit/screen.git/tree/src/screen.h?id=c184c6ec27683ff1a860c45be5cf520d896fd2ef#n44
ScrollDown (SD) scrolls the screen down n lines. New lines are added at the top of the screen. CSI Pn T See: https://vt100.net/docs/vt510-rm/SD.html
ScrollUp (SU) scrolls the screen up n lines. New lines are added at the bottom of the screen. CSI Pn S See: https://vt100.net/docs/vt510-rm/SU.html
SCS is an alias for SelectCharacterSet.
SD is an alias for [ScrollDown].
SecondaryDeviceAttributes (DA2) is a control sequence that reports the terminal's secondary device attributes. CSI > c CSI > 0 c CSI > Ps ; ... c See https://vt100.net/docs/vt510-rm/DA2.html
SelectCharacterSet sets the G-set character designator to the specified character set. ESC Ps Pd Where Ps is the G-set character designator, and Pd is the identifier. For 94-character sets, the designator can be one of: - ( G0 - ) G1 - * G2 - + G3 For 96-character sets, the designator can be one of: - - G1 - . G2 - / G3 Some common 94-character sets are: - 0 DEC Special Drawing Set - A United Kingdom (UK) - B United States (USASCII) Examples: ESC ( B Select character set G0 = United States (USASCII) ESC ( 0 Select character set G0 = Special Character and Line Drawing Set ESC ) 0 Select character set G1 = Special Character and Line Drawing Set ESC * A Select character set G2 = United Kingdom (UK) See: https://vt100.net/docs/vt510-rm/SCS.html
SelectGraphicRendition (SGR) is a command that sets display attributes. Default is 0. CSI Ps ; Ps ... m See: https://vt100.net/docs/vt510-rm/SGR.html
SetBackgroundColor returns a sequence that sets the default terminal background color. OSC 11 ; color ST OSC 11 ; color BEL Where color is the encoded color number. Most terminals support hex, XParseColor rgb: and rgba: strings. You could use [HexColor], [XRGBColor], or [XRGBAColor] to format the color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
SetClipboard returns a sequence for manipulating the clipboard. OSC 52 ; Pc ; Pd ST OSC 52 ; Pc ; Pd BEL Where Pc is the clipboard name and Pd is the base64 encoded data. Empty data or invalid base64 data will reset the clipboard. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
SetCursorColor returns a sequence that sets the terminal cursor color. OSC 12 ; color ST OSC 12 ; color BEL Where color is the encoded color number. Most terminals support hex, XParseColor rgb: and rgba: strings. You could use [HexColor], [XRGBColor], or [XRGBAColor] to format the color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
SetCursorPosition (CUP) returns a sequence for setting the cursor to the given row and column. CSI n ; m H See: https://vt100.net/docs/vt510-rm/CUP.html Deprecated: use [CursorPosition] instead.
SetCursorStyle (DECSCUSR) returns a sequence for changing the cursor style. Default is 1. CSI Ps SP q Where Ps is the cursor style: 0: Blinking block 1: Blinking block (default) 2: Steady block 3: Blinking underline 4: Steady underline 5: Blinking bar (xterm) 6: Steady bar (xterm) See: https://vt100.net/docs/vt510-rm/DECSCUSR.html See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
SetErrorProgressBar returns a sequence for setting the progress bar to a specific percentage (0-100) in the "Error" state.. OSC 9 ; 4 ; 2 Percentage BEL See: https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
SetForegroundColor returns a sequence that sets the default terminal foreground color. OSC 10 ; color ST OSC 10 ; color BEL Where color is the encoded color number. Most terminals support hex, XParseColor rgb: and rgba: strings. You could use [HexColor], [XRGBColor], or [XRGBAColor] to format the color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
SetIconName returns a sequence for setting the icon name. OSC 1 ; title ST OSC 1 ; title BEL See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
SetIconNameWindowTitle returns a sequence for setting the icon name and window title. OSC 0 ; title ST OSC 0 ; title BEL See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
SetKeyModifierOptions sets xterm key modifier options. This is an alias for [KeyModifierOptions].
SetLeftRightMargins (DECSLRM) sets the left and right margins for the scrolling region. Default is 1 and the right of the screen. CSI Pl ; Pr s See: https://vt100.net/docs/vt510-rm/DECSLRM.html
SetMode (SM) or (DECSET) returns a sequence to set a mode. The mode arguments are a list of modes to set. If one of the modes is a [DECMode], the function will returns two escape sequences. ANSI format: CSI Pd ; ... ; Pd h DEC format: CSI ? Pd ; ... ; Pd h See: https://vt100.net/docs/vt510-rm/SM.html
SetPalette sets the palette color for the given index. The index is a 16 color index between 0 and 15. The color is a 24-bit RGB color. OSC P n rrggbb BEL Where n is the color index in hex (0-f), and rrggbb is the color in hexadecimal format (e.g., ff0000 for red). This sequence is specific to the Linux Console and may not work in other terminal emulators. See https://man7.org/linux/man-pages/man4/console_codes.4.html
SetPointerShape returns a sequence for changing the mouse pointer cursor shape. Use "default" for the default pointer shape. OSC 22 ; Pt ST OSC 22 ; Pt BEL Where Pt is the pointer shape name. The name can be anything that the operating system can understand. Some common names are: - copy - crosshair - default - ew-resize - n-resize - text - wait See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
SetPrimaryClipboard returns a sequence for setting the primary clipboard. This is equivalent to SetClipboard(PrimaryClipboard, d).
SetProgressBar returns a sequence for setting the progress bar to a specific percentage (0-100) in the "default" state. OSC 9 ; 4 ; 1 Percentage BEL See: https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
SetScrollingRegion (DECSTBM) sets the top and bottom margins for the scrolling region. The default is the entire screen. CSI <top> ; <bottom> r See: https://vt100.net/docs/vt510-rm/DECSTBM.html Deprecated: use [SetTopBottomMargins] instead.
SetSystemClipboard returns a sequence for setting the system clipboard. This is equivalent to SetClipboard(SystemClipboard, d).
SetTopBottomMargins (DECSTBM) sets the top and bottom margins for the scrolling region. The default is the entire screen. Default is 1 and the bottom of the screen. CSI Pt ; Pb r See: https://vt100.net/docs/vt510-rm/DECSTBM.html
SetWarningProgressBar is a sequence that sets the progress bar to the "Warning" state. OSC 9 ; 4 ; 4 Percentage BEL See: https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
SetWindowTitle returns a sequence for setting the window title. OSC 2 ; title ST OSC 2 ; title BEL See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
SGR is an alias for [SelectGraphicRendition].
SixelGraphics returns a sequence that encodes the given sixel image payload to a DCS sixel sequence. DCS p1; p2; p3; q [sixel payload] ST p1 = pixel aspect ratio, deprecated and replaced by pixel metrics in the payload p2 = This is supposed to be 0 for transparency, but terminals don't seem to to use it properly. Value 0 leaves an unsightly black bar on all terminals I've tried and looks correct with value 1. p3 = Horizontal grid size parameter. Everyone ignores this and uses a fixed grid size, as far as I can tell. See https://shuford.invisible-island.net/all_about_sixels.txt
SM is an alias for [SetMode].
StringWidth returns the width of a string in cells. This is the number of cells that the string will occupy when printed in a terminal. ANSI escape codes are ignored and wide characters (such as East Asians and emojis) are accounted for. This treats the text as a sequence of grapheme clusters.
StringWidthWc returns the width of a string in cells. This is the number of cells that the string will occupy when printed in a terminal. ANSI escape codes are ignored and wide characters (such as East Asians and emojis) are accounted for. This treats the text as a sequence of wide characters and runes.
Strip removes ANSI escape codes from a string.
SU is an alias for [ScrollUp].
TabClear (TBC) clears tab stops. Default is 0. Possible values: 0: Clear tab stop at the current column. (default) 3: Clear all tab stops. CSI Pn g See: https://vt100.net/docs/vt510-rm/TBC.html
TabStopReport (DECTABSR) is the response to a tab stop report request. It reports the tab stops set in the terminal. The response is a list of tab stops separated by a slash (/) character. DCS 2 $ u D ... D ST Where D is a decimal number representing a tab stop. See: https://vt100.net/docs/vt510-rm/DECTABSR.html
TBC is an alias for [TabClear].
TertiaryDeviceAttributes (DA3) is a control sequence that reports the terminal's tertiary device attributes. CSI = c CSI = 0 c DCS ! | Text ST Where Text is the unit ID for the terminal. If no unit ID is given, or if the unit ID is 0, this function returns the request sequence. Otherwise, it returns the response sequence. See https://vt100.net/docs/vt510-rm/DA3.html
TmuxPassthrough wraps the given ANSI sequence in a special DCS passthrough sequence to be sent to the outer terminal. This is used to send raw escape sequences to the outer terminal when running inside Tmux. DCS tmux ; <escaped-data> ST Where <escaped-data> is the given sequence in which all occurrences of ESC (0x1b) are doubled i.e. replaced with ESC ESC (0x1b 0x1b). Note: this needs the `allow-passthrough` option to be set to `on`. See: https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it
ToParams converts a list of integers to a list of parameters.
Truncate truncates a string to a given length, adding a tail to the end if the string is longer than the given length. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). This treats the text as a sequence of graphemes.
TruncateLeft truncates a string from the left side by removing n characters, adding a prefix to the beginning if the string is longer than n. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). This treats the text as a sequence of graphemes.
TruncateLeftWc truncates a string from the left side by removing n characters, adding a prefix to the beginning if the string is longer than n. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). This treats the text as a sequence of wide characters and runes.
TruncateWc truncates a string to a given length, adding a tail to the end if the string is longer than the given length. This function is aware of ANSI escape codes and will not break them, and accounts for wide-characters (such as East-Asian characters and emojis). This treats the text as a sequence of wide characters and runes.
URxvtExt returns an escape sequence for calling a URxvt perl extension with the given name and parameters. OSC 777 ; extension_name ; param1 ; param2 ; ... ST OSC 777 ; extension_name ; param1 ; param2 ; ... BEL See: https://man.archlinux.org/man/extra/rxvt-unicode/urxvt.7.en#XTerm_Operating_System_Commands
VerticalPositionAbsolute (VPA) returns a sequence for moving the cursor to the given row. Default is 1. CSI n d See: https://vt100.net/docs/vt510-rm/VPA.html
VerticalPositionRelative (VPR) returns a sequence for moving the cursor down n rows relative to the current position. Default is 1. CSI n e See: https://vt100.net/docs/vt510-rm/VPR.html
VPA is an alias for [VerticalPositionAbsolute].
VPR is an alias for [VerticalPositionRelative].
WindowOp (XTWINOPS) is a sequence that manipulates the terminal window. CSI Ps ; Ps ; Ps t Ps is a semicolon-separated list of parameters. See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps;Ps;Ps-t.1EB0
Wordwrap wraps a string or a block of text to a given line length, not breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. This treats the text as a sequence of graphemes.
WordwrapWc wraps a string or a block of text to a given line length, not breaking word boundaries. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. This treats the text as a sequence of wide characters and runes.
Wrap wraps a string or a block of text to a given line length, breaking word boundaries if necessary. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. This treats the text as a sequence of graphemes.
WrapWc wraps a string or a block of text to a given line length, breaking word boundaries if necessary. This will preserve ANSI escape codes and will account for wide-characters in the string. The breakpoints string is a list of characters that are considered breakpoints for word wrapping. A hyphen (-) is always considered a breakpoint. Note: breakpoints must be a string of 1-cell wide rune characters. This treats the text as a sequence of wide characters and runes.
XParseColor is a helper function that parses a string into a color.Color. It provides a similar interface to the XParseColor function in Xlib. It supports the following formats: - #RGB - #RRGGBB - rgb:RRRR/GGGG/BBBB - rgba:RRRR/GGGG/BBBB/AAAA If the string is not a valid color, nil is returned. See: https://linux.die.net/man/3/xparsecolor
XTGETTCAP (RequestTermcap) requests Termcap/Terminfo strings. DCS + q <Pt> ST Where <Pt> is a list of Termcap/Terminfo capabilities, encoded in 2-digit hexadecimals, separated by semicolons. See: https://man7.org/linux/man-pages/man5/terminfo.5.html See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
XTMODKEYS is an alias for [KeyModifierOptions].
XTQMODKEYS is an alias for [QueryKeyModifierOptions].
XTWINOPS is an alias for [WindowOp].
Package-Level Variables (total 10, none are exported)
Package-Level Constants (total 730, in which 669 are exported)
ACK is the acknowledge character (Caret: ^F).
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Alternate Screen Mode determines whether the alternate screen buffer is active. Deprecated: use [ModeAltScreen] instead.
Alternate Screen Save Cursor Mode saves the cursor position and switches to alternate screen. Deprecated: use [ModeAltScreenSaveCursor] instead.
Any Event Mouse Tracking reports all motion events. Deprecated: use [ModeMouseAnyEvent] instead.
APC is the application program command character.
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
SGR (Select Graphic Rendition) style attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
Auto Wrap Mode (DECAWM) determines whether the cursor wraps to the next line. Deprecated: use [ModeAutoWrap] instead.
Backarrow Key Mode (DECBKM) determines whether the backspace key sends backspace or delete. Deprecated: use [ModeBackarrowKey] instead.
BiDirectional Support Mode (BDSM) is a mode that determines whether the terminal supports bidirectional text. When enabled, the terminal supports bidirectional text and is set to implicit bidirectional mode. When disabled, the terminal does not support bidirectional text. See ECMA-48 7.2.1.
BEL is the bell character (Caret: ^G, Char: \a).
BiDirectional Support Mode (BDSM) determines whether the terminal supports bidirectional text. Deprecated: use [ModeBiDirectionalSupport] instead.
Black is the ANSI black color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Blue is the ANSI blue color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Blur is an escape sequence to notify the terminal that it has lost focus. This is used with [FocusEventMode].
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BPH is the break permitted here character.
BracketedPasteEnd is the control sequence to disable bracketed paste mode.
Bracketed Paste Mode determines whether pasted text is bracketed with escape sequences. Deprecated: use [ModeBracketedPaste] instead.
BracketedPasteStart is the control sequence to enable bracketed paste mode.
BrightBlack is the ANSI bright black color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightBlue is the ANSI bright blue color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightCyan is the ANSI bright cyan color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightGreen is the ANSI bright green color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightMagenta is the ANSI bright magenta color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightRed is the ANSI bright red color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightWhite is the ANSI bright white color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BrightYellow is the ANSI bright yellow color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
BS is the backspace character (Caret: ^H, Char: \b).
Button Event Mouse Tracking reports button-motion events when a button is pressed. Deprecated: use [ModeMouseButtonEvent] instead.
CAN is the cancel character (Caret: ^X).
CCH is the cancel character.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
CR is the carriage return character (Caret: ^M, Char: \r).
CSI is the control sequence introducer character.
CUB1 is a sequence for moving the cursor left one cell.
CUD1 is a sequence for moving the cursor down one cell.
CUF1 is a sequence for moving the cursor right one cell.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
CursorDown1 is a sequence for moving the cursor down one cell. This is equivalent to CursorDown(1). Deprecated: use [CUD1] instead.
Text Cursor Enable mode. Deprecated: use [SetModeTextCursorEnable] and [ResetModeTextCursorEnable] instead.
CursorHomePosition is a sequence for moving the cursor to the upper left corner of the scrolling region. This is equivalent to [CursorPosition](1, 1).
Cursor Keys Mode (DECCKM) determines whether cursor keys send ANSI or application sequences. Deprecated: use [ModeCursorKeys] instead.
CursorLeft1 is a sequence for moving the cursor left one cell. This is equivalent to CursorLeft(1). Deprecated: use [CUB1] instead.
CursorOrigin is a sequence for moving the cursor to the upper left corner of the display. This is equivalent to `SetCursorPosition(1, 1)`. Deprecated: use [CursorHomePosition] instead.
CursorRight1 is a sequence for moving the cursor right one cell. This is equivalent to CursorRight(1). Deprecated: use [CUF1] instead.
CursorUp1 is a sequence for moving the cursor up one cell. This is equivalent to CursorUp(1). Deprecated: use [CUU1] instead.
CUU1 is a sequence for moving the cursor up one cell.
Cyan is the ANSI cyan color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
DC1 is the device control 1 character (Caret: ^Q).
DC2 is the device control 2 character (Caret: ^R).
DC3 is the device control 3 character (Caret: ^S).
DC4 is the device control 4 character (Caret: ^T).
DCS is the device control string character.
Auto Wrap Mode (DECAWM) is a mode that determines whether the cursor wraps to the next line when it reaches the right margin. See: https://vt100.net/docs/vt510-rm/DECAWM.html
Backarrow Key Mode (DECBKM) is a mode that determines whether the backspace key sends a backspace or delete character. Disabled by default. See: https://vt100.net/docs/vt510-rm/DECBKM.html
Cursor Keys Mode (DECCKM) is a mode that determines whether the cursor keys send ANSI cursor sequences or application sequences. See: https://vt100.net/docs/vt510-rm/DECCKM.html
Keypad Application Mode (DECKPAM) is a mode that determines whether the keypad sends application sequences or ANSI sequences. This works like enabling [DECNKM]. Use [NumericKeypadMode] to set the numeric keypad mode. ESC = See: https://vt100.net/docs/vt510-rm/DECKPAM.html
Keypad Numeric Mode (DECKPNM) is a mode that determines whether the keypad sends application sequences or ANSI sequences. This works the same as disabling [DECNKM]. ESC > See: https://vt100.net/docs/vt510-rm/DECKPNM.html
Left Right Margin Mode (DECLRMM) is a mode that determines whether the left and right margins can be set with [DECSLRM]. See: https://vt100.net/docs/vt510-rm/DECLRMM.html
Numeric Keypad Mode (DECNKM) is a mode that determines whether the keypad sends application sequences or numeric sequences. This works like [DECKPAM] and [DECKPNM], but uses different sequences. See: https://vt100.net/docs/vt510-rm/DECNKM.html
Origin Mode (DECOM) is a mode that determines whether the cursor moves to the home position or the margin position. See: https://vt100.net/docs/vt510-rm/DECOM.html
RestoreCursor (DECRC) is an escape sequence that restores the cursor position. ESC 8 See: https://vt100.net/docs/vt510-rm/DECRC.html
SaveCursor (DECSC) is an escape sequence that saves the current cursor position. ESC 7 See: https://vt100.net/docs/vt510-rm/DECSC.html
SetTabEvery8Columns (DECST8C) sets the tab stops at every 8 columns. CSI ? 5 W See: https://vt100.net/docs/vt510-rm/DECST8C.html
Text Cursor Enable Mode (DECTCEM) is a mode that shows/hides the cursor. See: https://vt100.net/docs/vt510-rm/DECTCEM.html
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
DEL is the delete character (Caret: ^?, Char: \x7f).
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Deprecated: use [SetModeBracketedPaste], [ResetModeBracketedPaste], and [RequestModeBracketedPaste] instead.
Cursor Keys mode. Deprecated: use [SetModeCursorKeys] and [ResetModeCursorKeys] instead.
Unicode Core mode. Deprecated: use [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
DisableKittyKeyboard is a sequence to push zero into the terminal Kitty Keyboard stack to disable the protocol. This is equivalent to PushKittyKeyboard(0).
DisableModifyOtherKeys disables the modifyOtherKeys mode. CSI > 4 ; 0 m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys Deprecated: use [ResetModifyOtherKeys] instead.
VT Mouse Tracking mode. Deprecated: use [ModeMouseNormal] instead.
All Mouse Tracking mode. Deprecated: use [ModeMouseAnyEvent] instead.
Cell Motion Mouse Tracking mode. Deprecated: use [ModeMouseButtonEvent] instead.
VT Hilite Mouse Tracking mode. Deprecated: use [ModeMouseHighlight] instead.
Mouse SGR Extended mode. Deprecated: use [ModeMouseExtSgr], [SetModeMouseExtSgr], [ResetModeMouseExtSgr], and [RequestModeMouseExtSgr] instead.
Focus reporting mode. Deprecated: use [SetModeFocusEvent], [ResetModeFocusEvent], and [RequestModeFocusEvent] instead.
Synchronized output mode. Deprecated: use [ModeSynchronizedOutput], [SetModeSynchronizedOutput], [ResetModeSynchronizedOutput], and [RequestModeSynchronizedOutput] instead.
Deprecated: use [SetModeWin32Input], [ResetModeWin32Input], and [RequestModeWin32Input] instead.
DLE is the data link escape character (Caret: ^P).
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
EM is the end of medium character (Caret: ^Y).
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Deprecated: use [SetModeBracketedPaste], [ResetModeBracketedPaste], and [RequestModeBracketedPaste] instead.
Cursor Keys mode. Deprecated: use [SetModeCursorKeys] and [ResetModeCursorKeys] instead.
Unicode Core mode. Deprecated: use [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
EnableModifyOtherKeys1 enables the modifyOtherKeys mode 1. CSI > 4 ; 1 m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys Deprecated: use [SetModifyOtherKeys1] instead.
EnableModifyOtherKeys2 enables the modifyOtherKeys mode 2. CSI > 4 ; 2 m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys Deprecated: use [SetModifyOtherKeys2] instead.
VT Mouse Tracking mode. Deprecated: use [ModeMouseNormal] instead.
All Mouse Tracking mode. Deprecated: use [ModeMouseAnyEvent] instead.
Cell Motion Mouse Tracking mode. Deprecated: use [ModeMouseButtonEvent] instead.
VT Hilite Mouse Tracking mode. Deprecated: use [ModeMouseHighlight] instead.
Mouse SGR Extended mode. Deprecated: use [ModeMouseExtSgr], [SetModeMouseExtSgr], [ResetModeMouseExtSgr], and [RequestModeMouseExtSgr] instead.
Focus reporting mode. Deprecated: use [SetModeFocusEvent], [ResetModeFocusEvent], and [RequestModeFocusEvent] instead.
Synchronized output mode. Deprecated: use [ModeSynchronizedOutput], [SetModeSynchronizedOutput], [ResetModeSynchronizedOutput], and [RequestModeSynchronizedOutput] instead.
Deprecated: use [SetModeWin32Input], [ResetModeWin32Input], and [RequestModeWin32Input] instead.
ENQ is the enquiry character (Caret: ^E).
EOT is the end of transmission character (Caret: ^D).
EPA is the end of guarded area character.
EraseDisplay constants. These are the possible values for the EraseDisplay function.
EraseLine constants. These are the possible values for the EraseLine function.
EraseDisplay constants. These are the possible values for the EraseDisplay function.
EraseLine constants. These are the possible values for the EraseLine function.
EraseLine constants. These are the possible values for the EraseLine function.
EraseDisplay constants. These are the possible values for the EraseDisplay function.
EraseDisplay constants. These are the possible values for the EraseDisplay function.
ESA is the end of selected area character.
ESC is the escape character (Caret: ^[, Char: \e).
ANSI escape sequence states used by [DecodeSequence].
ETB is the end of transmission block character (Caret: ^W).
ETX is the end of text character (Caret: ^C).
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
FF is the form feed character (Caret: ^L, Char: \f).
Focus is an escape sequence to notify the terminal that it has focus. This is used with [FocusEventMode].
Focus Event Mode determines whether the terminal reports focus and blur events. Deprecated: use [ModeFocusEvent] instead.
FS is the file separator character (Caret: ^\).
Grapheme Clustering Mode determines whether the terminal looks for grapheme clusters. Deprecated: use [ModeUnicodeCore], [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
Display width modes.
Green is the ANSI green color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
GS is the group separator character (Caret: ^]).
These are aliases for [SetModeTextCursorEnable] and [ResetModeTextCursorEnable].
Highlight Mouse Tracking determines whether the mouse reports on button presses and highlighted cells. Deprecated: use [ModeMouseHighlight] instead.
HomeCursorPosition is a sequence for moving the cursor to the upper left corner of the scrolling region. This is equivalent to `SetCursorPosition(1, 1)`. Deprecated: use [CursorHomePosition] instead.
HOP is the high octet preset character.
HorizontalTabSet (HTS) sets a horizontal tab stop at the current cursor column. This is equivalent to [HTS]. ESC H See: https://vt100.net/docs/vt510-rm/HTS.html
HorizontalVerticalHomePosition is a sequence for moving the cursor to the upper left corner of the scrolling region. This is equivalent to `HorizontalVerticalPosition(1, 1)`.
HT is the horizontal tab character (Caret: ^I, Char: \t).
HTJ is the horizontal tab with justification character.
HTS is the horizontal tab set character.
In Band Resize Mode reports terminal resize events as escape sequences. Deprecated: use [ModeInBandResize] instead.
IND is the index character.
Index (IND) is an escape sequence for moving the cursor down one line in the same column. If the cursor is at the bottom margin, the screen scrolls up. This has the same effect as [IND].
Insert/Replace Mode (IRM) determines whether characters are inserted or replaced. Deprecated: use [ModeInsertReplace] instead.
ANSI escape sequence states used by [DecodeSequence].
Insert/Replace Mode (IRM) is a mode that determines whether characters are inserted or replaced when typed. When enabled, characters are inserted at the cursor position pushing the characters to the right. When disabled, characters replace the character at the cursor position. See: https://vt100.net/docs/vt510-rm/IRM.html
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Keyboard Action Mode (KAM) is a mode that controls locking of the keyboard. When the keyboard is locked, it cannot send data to the terminal. See: https://vt100.net/docs/vt510-rm/KAM.html
Keyboard Action Mode (KAM) controls locking of the keyboard. Deprecated: use [ModeKeyboardAction] instead.
Keypad Application Mode (DECKPAM) is a mode that determines whether the keypad sends application sequences or ANSI sequences. This works like enabling [DECNKM]. Use [NumericKeypadMode] to set the numeric keypad mode. ESC = See: https://vt100.net/docs/vt510-rm/DECKPAM.html
Keypad Numeric Mode (DECKPNM) is a mode that determines whether the keypad sends application sequences or ANSI sequences. This works the same as disabling [DECNKM]. ESC > See: https://vt100.net/docs/vt510-rm/DECKPNM.html
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Kitty keyboard protocol progressive enhancement flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement
Left Right Margin Mode (DECLRMM) determines whether left and right margins can be set. Deprecated: use [ModeLeftRightMargin] instead.
LF is the line feed character (Caret: ^J, Char: \n).
Light Dark Mode enables reporting the operating system's color scheme preference. Deprecated: use [ModeLightDark] instead.
Line Feed/New Line Mode (LNM) determines whether the terminal interprets line feed as new line. Deprecated: use [ModeLineFeedNewLine] instead.
Line Feed/New Line Mode (LNM) is a mode that determines whether the terminal interprets the line feed character as a new line. When enabled, the terminal interprets the line feed character as a new line. When disabled, the terminal interprets the line feed character as a line feed. A new line moves the cursor to the first position of the next line. A line feed moves the cursor down one line without changing the column scrolling the screen if necessary. See: https://vt100.net/docs/vt510-rm/LNM.html
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
LS0 is the locking shift 0 character. This is an alias for [SI].
LS1 is the locking shift 1 character. This is an alias for [SO].
LS1R (Locking Shift 1 Right) shifts G1 into GR character set.
LS2 (Locking Shift 2) shifts G2 into GL character set.
LS2R (Locking Shift 2 Right) shifts G2 into GR character set.
LS3 (Locking Shift 3) shifts G3 into GL character set.
LS3R (Locking Shift 3 Right) shifts G3 into GR character set.
Magenta is the ANSI magenta color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Alternate Screen Mode is a mode that determines whether the alternate screen buffer is active. When this mode is enabled, the alternate screen buffer is cleared. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Alternate Screen Save Cursor Mode is a mode that saves the cursor position as in [ModeSaveCursor], switches to the alternate screen buffer as in [ModeAltScreen], and clears the screen on switch. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Auto Wrap Mode (DECAWM) is a mode that determines whether the cursor wraps to the next line when it reaches the right margin. See: https://vt100.net/docs/vt510-rm/DECAWM.html
Backarrow Key Mode (DECBKM) is a mode that determines whether the backspace key sends a backspace or delete character. Disabled by default. See: https://vt100.net/docs/vt510-rm/DECBKM.html
BiDirectional Support Mode (BDSM) is a mode that determines whether the terminal supports bidirectional text. When enabled, the terminal supports bidirectional text and is set to implicit bidirectional mode. When disabled, the terminal does not support bidirectional text. See ECMA-48 7.2.1.
Bracketed Paste Mode is a mode that determines whether pasted text is bracketed with escape sequences. See: https://cirw.in/blog/bracketed-paste See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode
Cursor Keys Mode (DECCKM) is a mode that determines whether the cursor keys send ANSI cursor sequences or application sequences. See: https://vt100.net/docs/vt510-rm/DECCKM.html
Focus Event Mode is a mode that determines whether the terminal reports focus and blur events. The terminal sends the following encoding: CSI I // Focus In CSI O // Focus Out See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Focus-Tracking
ModeInBandResize is a mode that reports terminal resize events as escape sequences. This is useful for systems that do not support [SIGWINCH] like Windows. The terminal then sends the following encoding: CSI 48 ; cellsHeight ; cellsWidth ; pixelHeight ; pixelWidth t See: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Insert/Replace Mode (IRM) is a mode that determines whether characters are inserted or replaced when typed. When enabled, characters are inserted at the cursor position pushing the characters to the right. When disabled, characters replace the character at the cursor position. See: https://vt100.net/docs/vt510-rm/IRM.html
Keyboard Action Mode (KAM) is a mode that controls locking of the keyboard. When the keyboard is locked, it cannot send data to the terminal. See: https://vt100.net/docs/vt510-rm/KAM.html
Left Right Margin Mode (DECLRMM) is a mode that determines whether the left and right margins can be set with [DECSLRM]. See: https://vt100.net/docs/vt510-rm/DECLRMM.html
ModeLightDark is a mode that enables reporting the operating system's color scheme (light or dark) preference. It reports the color scheme as a [DSR] and [LightDarkReport] escape sequences encoded as follows: CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode The color preference can also be requested via the following [DSR] and [RequestLightDarkReport] escape sequences: CSI ? 996 n See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
Line Feed/New Line Mode (LNM) is a mode that determines whether the terminal interprets the line feed character as a new line. When enabled, the terminal interprets the line feed character as a new line. When disabled, the terminal interprets the line feed character as a line feed. A new line moves the cursor to the first position of the next line. A line feed moves the cursor down one line without changing the column scrolling the screen if necessary. See: https://vt100.net/docs/vt510-rm/LNM.html
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Any Event Mouse Tracking is the same as [ModeMouseButtonEvent], except that all motion events are reported even if no mouse buttons are pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Button Event Mouse Tracking is essentially the same as [ModeMouseNormal], but it also reports button-motion events when a button is pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters. The terminal responds with the following encoding: CSI < Cb ; Cx ; Cy M Where Cb is the same as [ModeMouseNormal], and Cx and Cy are the x and y. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Pixel Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters with pixel coordinates. This is similar to [ModeMouseExtSgr], but also reports pixel coordinates. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
URXVT Extended Mouse Mode is a mode that changes the mouse tracking encoding to use an alternate encoding. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
UTF-8 Extended Mouse Mode is a mode that changes the mouse tracking encoding to use UTF-8 parameters. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Highlight Mouse Tracking is a mode that determines whether the mouse reports on button presses, releases, and highlighted cells. It uses the same encoding as [ModeMouseNormal] with a few differences: On highlight events, the terminal responds with the following encoding: CSI t CxCy CSI T CxCyCxCyCxCy Where the parameters are startx, starty, endx, endy, mousex, and mousey.
Normal Mouse Mode is a mode that determines whether the mouse reports on button presses and releases. It will also report modifier keys, wheel events, and extra buttons. It uses the same encoding as [ModeMouseX10] with a few differences: See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
X10 Mouse Mode is a mode that determines whether the mouse reports on button presses. The terminal responds with the following encoding: CSI M CbCxCy Where Cb is the button-1, where it can be 1, 2, or 3. Cx and Cy are the x and y coordinates of the mouse event. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
ModeSetting constants.
Numeric Keypad Mode (DECNKM) is a mode that determines whether the keypad sends application sequences or numeric sequences. This works like [DECKPAM] and [DECKPNM], but uses different sequences. See: https://vt100.net/docs/vt510-rm/DECNKM.html
Origin Mode (DECOM) is a mode that determines whether the cursor moves to the home position or the margin position. See: https://vt100.net/docs/vt510-rm/DECOM.html
ModeSetting constants.
ModeSetting constants.
ModeSetting constants.
Save Cursor Mode is a mode that saves the cursor position. This is equivalent to [SaveCursor] and [RestoreCursor]. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
ModeSetting constants.
Synchronized Output Mode is a mode that determines whether output is synchronized with the terminal. See: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
Text Cursor Enable Mode (DECTCEM) is a mode that shows/hides the cursor. See: https://vt100.net/docs/vt510-rm/DECTCEM.html
Unicode Core Mode is a mode that determines whether the terminal should use Unicode grapheme clustering to calculate the width of glyphs for each terminal cell. See: https://github.com/contour-terminal/terminal-unicode-core
Win32Input is a mode that determines whether input is processed by the Win32 console and Conpty. See: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
All Mouse Tracking mode. Deprecated: use [ModeMouseAnyEvent] instead.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Cell Motion Mouse Tracking mode. Deprecated: use [ModeMouseButtonEvent] instead.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
VT Hilite Mouse Tracking mode. Deprecated: use [ModeMouseHighlight] instead.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
VT Mouse Tracking mode. Deprecated: use [ModeMouseNormal] instead.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse SGR Extended mode. Deprecated: use [ModeMouseExtSgr], [SetModeMouseExtSgr], [ResetModeMouseExtSgr], and [RequestModeMouseExtSgr] instead.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
Mouse event buttons This is based on X11 mouse button codes. 1 = left button 2 = middle button (pressing the scroll wheel) 3 = right button 4 = turn scroll wheel up 5 = turn scroll wheel down 6 = push scroll wheel left 7 = push scroll wheel right 8 = 4th button (aka browser backward button) 9 = 5th button (aka browser forward button) 10 11 Other buttons are not supported.
MoveCursorOrigin is a sequence for moving the cursor to the upper left corner of the display. This is equivalent to `SetCursorPosition(1, 1)`. Deprecated: use [CursorHomePosition] instead.
MW is the message waiting character.
NAK is the negative acknowledge character (Caret: ^U).
NBH is the no break here character.
NEL is the next line character.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Normal Mouse Mode determines whether the mouse reports on button presses and releases. Deprecated: use [ModeMouseNormal] instead.
ANSI escape sequence states used by [DecodeSequence].
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
NUL is the null character (Caret: ^@, Char: \0).
Numeric Keypad Mode (DECNKM) determines whether the keypad sends application or numeric sequences. Deprecated: use [ModeNumericKeypad] instead.
Origin Mode (DECOM) determines whether the cursor moves to home or margin position. Deprecated: use [ModeOrigin] instead.
OSC is the operating system command character.
PAD is the padding character.
ANSI escape sequence states used by [DecodeSequence].
PLD is the partial line forward character.
PLU is the partial line backward character.
PM is the privacy message character.
ANSI escape sequence states used by [DecodeSequence].
Clipboard names.
PU1 is the private use 1 character.
PU2 is the private use 2 character.
Modify Other Keys (modifyOtherKeys) is an xterm feature that allows the terminal to modify the behavior of certain keys to send different escape sequences when pressed. See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Red is the ANSI red color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Focus reporting mode. Deprecated: use [SetModeFocusEvent], [ResetModeFocusEvent], and [RequestModeFocusEvent] instead.
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Alternate Screen Mode determines whether the alternate screen buffer is active. Deprecated: use [ModeAltScreen] instead.
Alternate Screen Save Cursor Mode saves the cursor position and switches to alternate screen. Deprecated: use [ModeAltScreenSaveCursor] instead.
Any Event Mouse Tracking reports all motion events. Deprecated: use [ModeMouseAnyEvent] instead.
Auto Wrap Mode (DECAWM) determines whether the cursor wraps to the next line. Deprecated: use [ModeAutoWrap] instead.
Backarrow Key Mode (DECBKM) determines whether the backspace key sends backspace or delete. Deprecated: use [ModeBackarrowKey] instead.
RequestBackgroundColor is a sequence that requests the current default terminal background color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
BiDirectional Support Mode (BDSM) determines whether the terminal supports bidirectional text. Deprecated: use [ModeBiDirectionalSupport] instead.
Deprecated: use [SetModeBracketedPaste], [ResetModeBracketedPaste], and [RequestModeBracketedPaste] instead.
Bracketed Paste Mode determines whether pasted text is bracketed with escape sequences. Deprecated: use [ModeBracketedPaste] instead.
Button Event Mouse Tracking reports button-motion events when a button is pressed. Deprecated: use [ModeMouseButtonEvent] instead.
RequestCellSizeWinOp is a window operation that requests a report of the size of the terminal cell size in pixels. The response is in the form: CSI 6 ; height ; width t Deprecated: Use constant number directly with [WindowOp].
RequestCursorColor is a sequence that requests the current terminal cursor color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
Cursor Keys Mode (DECCKM) determines whether cursor keys send ANSI or application sequences. Deprecated: use [ModeCursorKeys] instead.
RequestCursorPosition is an escape sequence that requests the current cursor position. CSI 6 n The terminal will report the cursor position as a CSI sequence in the following format: CSI Pl ; Pc R Where Pl is the line number and Pc is the column number. See: https://vt100.net/docs/vt510-rm/CPR.html Deprecated: use [RequestCursorPositionReport] instead.
RequestCursorPositionReport is an escape sequence that requests the current cursor position. CSI 6 n The terminal will report the cursor position as a CSI sequence in the following format: CSI Pl ; Pc R Where Pl is the line number and Pc is the column number. See: https://vt100.net/docs/vt510-rm/CPR.html
Text Cursor Enable mode. Deprecated: use [SetModeTextCursorEnable] and [ResetModeTextCursorEnable] instead.
RequestExtendedCursorPosition (DECXCPR) is a sequence for requesting the cursor position report including the current page number. CSI ? 6 n The terminal will report the cursor position as a CSI sequence in the following format: CSI ? Pl ; Pc ; Pp R Where Pl is the line number, Pc is the column number, and Pp is the page number. See: https://vt100.net/docs/vt510-rm/DECXCPR.html Deprecated: use [RequestExtendedCursorPositionReport] instead.
RequestExtendedCursorPositionReport (DECXCPR) is a sequence for requesting the cursor position report including the current page number. CSI ? 6 n The terminal will report the cursor position as a CSI sequence in the following format: CSI ? Pl ; Pc ; Pp R Where Pl is the line number, Pc is the column number, and Pp is the page number. See: https://vt100.net/docs/vt510-rm/DECXCPR.html
Focus Event Mode determines whether the terminal reports focus and blur events. Deprecated: use [ModeFocusEvent] instead.
RequestForegroundColor is a sequence that requests the current default terminal foreground color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
Unicode Core mode. Deprecated: use [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
Grapheme Clustering Mode determines whether the terminal looks for grapheme clusters. Deprecated: use [ModeUnicodeCore], [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
Highlight Mouse Tracking determines whether the mouse reports on button presses and highlighted cells. Deprecated: use [ModeMouseHighlight] instead.
In Band Resize Mode reports terminal resize events as escape sequences. Deprecated: use [ModeInBandResize] instead.
Insert/Replace Mode (IRM) determines whether characters are inserted or replaced. Deprecated: use [ModeInsertReplace] instead.
Keyboard Action Mode (KAM) controls locking of the keyboard. Deprecated: use [ModeKeyboardAction] instead.
RequestKittyKeyboard is a sequence to request the terminal Kitty keyboard protocol enabled flags. See: https://sw.kovidgoyal.net/kitty/keyboard-protocol/
Left Right Margin Mode (DECLRMM) determines whether left and right margins can be set. Deprecated: use [ModeLeftRightMargin] instead.
Light Dark Mode enables reporting the operating system's color scheme preference. Deprecated: use [ModeLightDark] instead.
RequestLightDarkReport is a control sequence that requests the terminal to report its operating system light/dark color preference. Supported terminals should respond with a [LightDarkReport] sequence as follows: CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
Line Feed/New Line Mode (LNM) determines whether the terminal interprets line feed as new line. Deprecated: use [ModeLineFeedNewLine] instead.
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
Alternate Screen Mode is a mode that determines whether the alternate screen buffer is active. When this mode is enabled, the alternate screen buffer is cleared. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Alternate Screen Save Cursor Mode is a mode that saves the cursor position as in [ModeSaveCursor], switches to the alternate screen buffer as in [ModeAltScreen], and clears the screen on switch. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Auto Wrap Mode (DECAWM) is a mode that determines whether the cursor wraps to the next line when it reaches the right margin. See: https://vt100.net/docs/vt510-rm/DECAWM.html
Backarrow Key Mode (DECBKM) is a mode that determines whether the backspace key sends a backspace or delete character. Disabled by default. See: https://vt100.net/docs/vt510-rm/DECBKM.html
BiDirectional Support Mode (BDSM) is a mode that determines whether the terminal supports bidirectional text. When enabled, the terminal supports bidirectional text and is set to implicit bidirectional mode. When disabled, the terminal does not support bidirectional text. See ECMA-48 7.2.1.
Bracketed Paste Mode is a mode that determines whether pasted text is bracketed with escape sequences. See: https://cirw.in/blog/bracketed-paste See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode
Cursor Keys Mode (DECCKM) is a mode that determines whether the cursor keys send ANSI cursor sequences or application sequences. See: https://vt100.net/docs/vt510-rm/DECCKM.html
Focus Event Mode is a mode that determines whether the terminal reports focus and blur events. The terminal sends the following encoding: CSI I // Focus In CSI O // Focus Out See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Focus-Tracking
ModeInBandResize is a mode that reports terminal resize events as escape sequences. This is useful for systems that do not support [SIGWINCH] like Windows. The terminal then sends the following encoding: CSI 48 ; cellsHeight ; cellsWidth ; pixelHeight ; pixelWidth t See: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Insert/Replace Mode (IRM) is a mode that determines whether characters are inserted or replaced when typed. When enabled, characters are inserted at the cursor position pushing the characters to the right. When disabled, characters replace the character at the cursor position. See: https://vt100.net/docs/vt510-rm/IRM.html
Keyboard Action Mode (KAM) is a mode that controls locking of the keyboard. When the keyboard is locked, it cannot send data to the terminal. See: https://vt100.net/docs/vt510-rm/KAM.html
Left Right Margin Mode (DECLRMM) is a mode that determines whether the left and right margins can be set with [DECSLRM]. See: https://vt100.net/docs/vt510-rm/DECLRMM.html
ModeLightDark is a mode that enables reporting the operating system's color scheme (light or dark) preference. It reports the color scheme as a [DSR] and [LightDarkReport] escape sequences encoded as follows: CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode The color preference can also be requested via the following [DSR] and [RequestLightDarkReport] escape sequences: CSI ? 996 n See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
Line Feed/New Line Mode (LNM) is a mode that determines whether the terminal interprets the line feed character as a new line. When enabled, the terminal interprets the line feed character as a new line. When disabled, the terminal interprets the line feed character as a line feed. A new line moves the cursor to the first position of the next line. A line feed moves the cursor down one line without changing the column scrolling the screen if necessary. See: https://vt100.net/docs/vt510-rm/LNM.html
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Any Event Mouse Tracking is the same as [ModeMouseButtonEvent], except that all motion events are reported even if no mouse buttons are pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Button Event Mouse Tracking is essentially the same as [ModeMouseNormal], but it also reports button-motion events when a button is pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters. The terminal responds with the following encoding: CSI < Cb ; Cx ; Cy M Where Cb is the same as [ModeMouseNormal], and Cx and Cy are the x and y. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Pixel Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters with pixel coordinates. This is similar to [ModeMouseExtSgr], but also reports pixel coordinates. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
URXVT Extended Mouse Mode is a mode that changes the mouse tracking encoding to use an alternate encoding. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
UTF-8 Extended Mouse Mode is a mode that changes the mouse tracking encoding to use UTF-8 parameters. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Highlight Mouse Tracking is a mode that determines whether the mouse reports on button presses, releases, and highlighted cells. It uses the same encoding as [ModeMouseNormal] with a few differences: On highlight events, the terminal responds with the following encoding: CSI t CxCy CSI T CxCyCxCyCxCy Where the parameters are startx, starty, endx, endy, mousex, and mousey.
Normal Mouse Mode is a mode that determines whether the mouse reports on button presses and releases. It will also report modifier keys, wheel events, and extra buttons. It uses the same encoding as [ModeMouseX10] with a few differences: See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
X10 Mouse Mode is a mode that determines whether the mouse reports on button presses. The terminal responds with the following encoding: CSI M CbCxCy Where Cb is the button-1, where it can be 1, 2, or 3. Cx and Cy are the x and y coordinates of the mouse event. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Numeric Keypad Mode (DECNKM) is a mode that determines whether the keypad sends application sequences or numeric sequences. This works like [DECKPAM] and [DECKPNM], but uses different sequences. See: https://vt100.net/docs/vt510-rm/DECNKM.html
Origin Mode (DECOM) is a mode that determines whether the cursor moves to the home position or the margin position. See: https://vt100.net/docs/vt510-rm/DECOM.html
Save Cursor Mode is a mode that saves the cursor position. This is equivalent to [SaveCursor] and [RestoreCursor]. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Synchronized Output Mode is a mode that determines whether output is synchronized with the terminal. See: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
Text Cursor Enable Mode (DECTCEM) is a mode that shows/hides the cursor. See: https://vt100.net/docs/vt510-rm/DECTCEM.html
Unicode Core Mode is a mode that determines whether the terminal should use Unicode grapheme clustering to calculate the width of glyphs for each terminal cell. See: https://github.com/contour-terminal/terminal-unicode-core
Win32Input is a mode that determines whether input is processed by the Win32 console and Conpty. See: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
RequestModifyOtherKeys requests the modifyOtherKeys mode. CSI ? 4 m See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys Deprecated: use [QueryModifyOtherKeys] instead.
VT Mouse Tracking mode. Deprecated: use [ModeMouseNormal] instead.
All Mouse Tracking mode. Deprecated: use [ModeMouseAnyEvent] instead.
Cell Motion Mouse Tracking mode. Deprecated: use [ModeMouseButtonEvent] instead.
VT Hilite Mouse Tracking mode. Deprecated: use [ModeMouseHighlight] instead.
Mouse SGR Extended mode. Deprecated: use [ModeMouseExtSgr], [SetModeMouseExtSgr], [ResetModeMouseExtSgr], and [RequestModeMouseExtSgr] instead.
RequestNameVersion (XTVERSION) is a control sequence that requests the terminal's name and version. It responds with a DSR sequence identifying the terminal. CSI > 0 q DCS > | text ST See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys
Normal Mouse Mode determines whether the mouse reports on button presses and releases. Deprecated: use [ModeMouseNormal] instead.
Numeric Keypad Mode (DECNKM) determines whether the keypad sends application or numeric sequences. Deprecated: use [ModeNumericKeypad] instead.
Origin Mode (DECOM) determines whether the cursor moves to home or margin position. Deprecated: use [ModeOrigin] instead.
RequestPrimaryClipboard is a sequence for requesting the primary clipboard. This is equivalent to RequestClipboard(PrimaryClipboard).
RequestPrimaryDeviceAttributes is a control sequence that requests the terminal's primary device attributes (DA1). CSI c See https://vt100.net/docs/vt510-rm/DA1.html
Focus reporting mode. Deprecated: use [SetModeFocusEvent], [ResetModeFocusEvent], and [RequestModeFocusEvent] instead.
Save Cursor Mode saves the cursor position. Deprecated: use [ModeSaveCursor] instead.
RequestSecondaryDeviceAttributes is a control sequence that requests the terminal's secondary device attributes (DA2). CSI > c See https://vt100.net/docs/vt510-rm/DA2.html
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
SGR Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters. Deprecated: use [ModeMouseExtSgr] instead.
SGR Pixel Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters with pixel coordinates. Deprecated: use [ModeMouseExtSgrPixel] instead.
Synchronized output mode. Deprecated: use [ModeSynchronizedOutput], [SetModeSynchronizedOutput], [ResetModeSynchronizedOutput], and [RequestModeSynchronizedOutput] instead.
Synchronized Output Mode determines whether output is synchronized with the terminal. Deprecated: use [ModeSynchronizedOutput] instead.
RequestSystemClipboard is a sequence for requesting the system clipboard. This is equivalent to RequestClipboard(SystemClipboard).
RequestTertiaryDeviceAttributes is a control sequence that requests the terminal's tertiary device attributes (DA3). CSI = c See https://vt100.net/docs/vt510-rm/DA3.html
Text Cursor Enable Mode (DECTCEM) shows/hides the cursor. Deprecated: use [ModeTextCursorEnable] instead.
Unicode Core Mode determines whether the terminal uses Unicode grapheme clustering. Deprecated: use [ModeUnicodeCore] instead.
URXVT Extended Mouse Mode changes the mouse tracking encoding to use an alternate encoding. Deprecated: use [ModeMouseUrxvtExt] instead.
UTF-8 Extended Mouse Mode changes the mouse tracking encoding to use UTF-8 parameters. Deprecated: use [ModeMouseExtUtf8] instead.
Deprecated: use [SetModeWin32Input], [ResetModeWin32Input], and [RequestModeWin32Input] instead.
Win32Input determines whether input is processed by the Win32 console and Conpty. Deprecated: use [ModeWin32Input] instead.
RequestWindowSizeWinOp is a window operation that requests a report of the size of the terminal window in pixels. The response is in the form: CSI 4 ; height ; width t Deprecated: Use constant number directly with [WindowOp].
X10 Mouse Mode determines whether the mouse reports on button presses. Deprecated: use [ModeMouseX10] instead.
RequestXTVersion is a control sequence that requests the terminal's XTVERSION. It responds with a DSR sequence identifying the version. CSI > Ps q DCS > | text ST See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys Deprecated: use [RequestNameVersion] instead.
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Alternate Screen Mode determines whether the alternate screen buffer is active. Deprecated: use [ModeAltScreen] instead.
Alternate Screen Save Cursor Mode saves the cursor position and switches to alternate screen. Deprecated: use [ModeAltScreenSaveCursor] instead.
Any Event Mouse Tracking reports all motion events. Deprecated: use [ModeMouseAnyEvent] instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Auto Wrap Mode (DECAWM) determines whether the cursor wraps to the next line. Deprecated: use [ModeAutoWrap] instead.
Backarrow Key Mode (DECBKM) determines whether the backspace key sends backspace or delete. Deprecated: use [ModeBackarrowKey] instead.
ResetBackgroundColor is a sequence that resets the default terminal background color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
BiDirectional Support Mode (BDSM) determines whether the terminal supports bidirectional text. Deprecated: use [ModeBiDirectionalSupport] instead.
Bracketed Paste Mode determines whether pasted text is bracketed with escape sequences. Deprecated: use [ModeBracketedPaste] instead.
Button Event Mouse Tracking reports button-motion events when a button is pressed. Deprecated: use [ModeMouseButtonEvent] instead.
ResetCursorColor is a sequence that resets the terminal cursor color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
Cursor Keys Mode (DECCKM) determines whether cursor keys send ANSI or application sequences. Deprecated: use [ModeCursorKeys] instead.
Focus Event Mode determines whether the terminal reports focus and blur events. Deprecated: use [ModeFocusEvent] instead.
ResetForegroundColor is a sequence that resets the default terminal foreground color. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands
Grapheme Clustering Mode determines whether the terminal looks for grapheme clusters. Deprecated: use [ModeUnicodeCore], [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
Highlight Mouse Tracking determines whether the mouse reports on button presses and highlighted cells. Deprecated: use [ModeMouseHighlight] instead.
In Band Resize Mode reports terminal resize events as escape sequences. Deprecated: use [ModeInBandResize] instead.
ResetInitialState (RIS) resets the terminal to its initial state. ESC c See: https://vt100.net/docs/vt510-rm/RIS.html
Insert/Replace Mode (IRM) determines whether characters are inserted or replaced. Deprecated: use [ModeInsertReplace] instead.
Keyboard Action Mode (KAM) controls locking of the keyboard. Deprecated: use [ModeKeyboardAction] instead.
Left Right Margin Mode (DECLRMM) determines whether left and right margins can be set. Deprecated: use [ModeLeftRightMargin] instead.
Light Dark Mode enables reporting the operating system's color scheme preference. Deprecated: use [ModeLightDark] instead.
Line Feed/New Line Mode (LNM) determines whether the terminal interprets line feed as new line. Deprecated: use [ModeLineFeedNewLine] instead.
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
Alternate Screen Mode is a mode that determines whether the alternate screen buffer is active. When this mode is enabled, the alternate screen buffer is cleared. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Alternate Screen Save Cursor Mode is a mode that saves the cursor position as in [ModeSaveCursor], switches to the alternate screen buffer as in [ModeAltScreen], and clears the screen on switch. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Auto Wrap Mode (DECAWM) is a mode that determines whether the cursor wraps to the next line when it reaches the right margin. See: https://vt100.net/docs/vt510-rm/DECAWM.html
Backarrow Key Mode (DECBKM) is a mode that determines whether the backspace key sends a backspace or delete character. Disabled by default. See: https://vt100.net/docs/vt510-rm/DECBKM.html
BiDirectional Support Mode (BDSM) is a mode that determines whether the terminal supports bidirectional text. When enabled, the terminal supports bidirectional text and is set to implicit bidirectional mode. When disabled, the terminal does not support bidirectional text. See ECMA-48 7.2.1.
Bracketed Paste Mode is a mode that determines whether pasted text is bracketed with escape sequences. See: https://cirw.in/blog/bracketed-paste See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode
Cursor Keys Mode (DECCKM) is a mode that determines whether the cursor keys send ANSI cursor sequences or application sequences. See: https://vt100.net/docs/vt510-rm/DECCKM.html
Focus Event Mode is a mode that determines whether the terminal reports focus and blur events. The terminal sends the following encoding: CSI I // Focus In CSI O // Focus Out See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Focus-Tracking
ModeInBandResize is a mode that reports terminal resize events as escape sequences. This is useful for systems that do not support [SIGWINCH] like Windows. The terminal then sends the following encoding: CSI 48 ; cellsHeight ; cellsWidth ; pixelHeight ; pixelWidth t See: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Insert/Replace Mode (IRM) is a mode that determines whether characters are inserted or replaced when typed. When enabled, characters are inserted at the cursor position pushing the characters to the right. When disabled, characters replace the character at the cursor position. See: https://vt100.net/docs/vt510-rm/IRM.html
Keyboard Action Mode (KAM) is a mode that controls locking of the keyboard. When the keyboard is locked, it cannot send data to the terminal. See: https://vt100.net/docs/vt510-rm/KAM.html
Left Right Margin Mode (DECLRMM) is a mode that determines whether the left and right margins can be set with [DECSLRM]. See: https://vt100.net/docs/vt510-rm/DECLRMM.html
ModeLightDark is a mode that enables reporting the operating system's color scheme (light or dark) preference. It reports the color scheme as a [DSR] and [LightDarkReport] escape sequences encoded as follows: CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode The color preference can also be requested via the following [DSR] and [RequestLightDarkReport] escape sequences: CSI ? 996 n See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
Line Feed/New Line Mode (LNM) is a mode that determines whether the terminal interprets the line feed character as a new line. When enabled, the terminal interprets the line feed character as a new line. When disabled, the terminal interprets the line feed character as a line feed. A new line moves the cursor to the first position of the next line. A line feed moves the cursor down one line without changing the column scrolling the screen if necessary. See: https://vt100.net/docs/vt510-rm/LNM.html
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Any Event Mouse Tracking is the same as [ModeMouseButtonEvent], except that all motion events are reported even if no mouse buttons are pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Button Event Mouse Tracking is essentially the same as [ModeMouseNormal], but it also reports button-motion events when a button is pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters. The terminal responds with the following encoding: CSI < Cb ; Cx ; Cy M Where Cb is the same as [ModeMouseNormal], and Cx and Cy are the x and y. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Pixel Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters with pixel coordinates. This is similar to [ModeMouseExtSgr], but also reports pixel coordinates. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
URXVT Extended Mouse Mode is a mode that changes the mouse tracking encoding to use an alternate encoding. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
UTF-8 Extended Mouse Mode is a mode that changes the mouse tracking encoding to use UTF-8 parameters. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Highlight Mouse Tracking is a mode that determines whether the mouse reports on button presses, releases, and highlighted cells. It uses the same encoding as [ModeMouseNormal] with a few differences: On highlight events, the terminal responds with the following encoding: CSI t CxCy CSI T CxCyCxCyCxCy Where the parameters are startx, starty, endx, endy, mousex, and mousey.
Normal Mouse Mode is a mode that determines whether the mouse reports on button presses and releases. It will also report modifier keys, wheel events, and extra buttons. It uses the same encoding as [ModeMouseX10] with a few differences: See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
X10 Mouse Mode is a mode that determines whether the mouse reports on button presses. The terminal responds with the following encoding: CSI M CbCxCy Where Cb is the button-1, where it can be 1, 2, or 3. Cx and Cy are the x and y coordinates of the mouse event. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Numeric Keypad Mode (DECNKM) is a mode that determines whether the keypad sends application sequences or numeric sequences. This works like [DECKPAM] and [DECKPNM], but uses different sequences. See: https://vt100.net/docs/vt510-rm/DECNKM.html
Origin Mode (DECOM) is a mode that determines whether the cursor moves to the home position or the margin position. See: https://vt100.net/docs/vt510-rm/DECOM.html
Save Cursor Mode is a mode that saves the cursor position. This is equivalent to [SaveCursor] and [RestoreCursor]. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Synchronized Output Mode is a mode that determines whether output is synchronized with the terminal. See: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
Text Cursor Enable Mode (DECTCEM) is a mode that shows/hides the cursor. See: https://vt100.net/docs/vt510-rm/DECTCEM.html
Unicode Core Mode is a mode that determines whether the terminal should use Unicode grapheme clustering to calculate the width of glyphs for each terminal cell. See: https://github.com/contour-terminal/terminal-unicode-core
Win32Input is a mode that determines whether input is processed by the Win32 console and Conpty. See: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
Modify Other Keys (modifyOtherKeys) is an xterm feature that allows the terminal to modify the behavior of certain keys to send different escape sequences when pressed. See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
Normal Mouse Mode determines whether the mouse reports on button presses and releases. Deprecated: use [ModeMouseNormal] instead.
Numeric Keypad Mode (DECNKM) determines whether the keypad sends application or numeric sequences. Deprecated: use [ModeNumericKeypad] instead.
Origin Mode (DECOM) determines whether the cursor moves to home or margin position. Deprecated: use [ModeOrigin] instead.
ResetPalette resets the color palette to the default values. This sequence is specific to the Linux Console and may not work in other terminal emulators. See https://man7.org/linux/man-pages/man4/console_codes.4.html
ResetPrimaryClipboard is a sequence for resetting the primary clipboard. This is equivalent to ResetClipboard(PrimaryClipboard).
ResetProgressBar is a sequence that resets the progress bar to its default state (hidden). OSC 9 ; 4 ; 0 BEL See: https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
Save Cursor Mode saves the cursor position. Deprecated: use [ModeSaveCursor] instead.
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
SGR Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters. Deprecated: use [ModeMouseExtSgr] instead.
SGR Pixel Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters with pixel coordinates. Deprecated: use [ModeMouseExtSgrPixel] instead.
ResetStyle is a SGR (Select Graphic Rendition) style sequence that resets all attributes. See: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
Synchronized Output Mode determines whether output is synchronized with the terminal. Deprecated: use [ModeSynchronizedOutput] instead.
ResetSystemClipboard is a sequence for resetting the system clipboard. This is equivalent to ResetClipboard(SystemClipboard).
Text Cursor Enable Mode (DECTCEM) shows/hides the cursor. Deprecated: use [ModeTextCursorEnable] instead.
Unicode Core Mode determines whether the terminal uses Unicode grapheme clustering. Deprecated: use [ModeUnicodeCore] instead.
URXVT Extended Mouse Mode changes the mouse tracking encoding to use an alternate encoding. Deprecated: use [ModeMouseUrxvtExt] instead.
UTF-8 Extended Mouse Mode changes the mouse tracking encoding to use UTF-8 parameters. Deprecated: use [ModeMouseExtUtf8] instead.
Win32Input determines whether input is processed by the Win32 console and Conpty. Deprecated: use [ModeWin32Input] instead.
X10 Mouse Mode determines whether the mouse reports on button presses. Deprecated: use [ModeMouseX10] instead.
ResizeWindowWinOp is a window operation that resizes the terminal window. Deprecated: Use constant number directly with [WindowOp].
RestoreCurrentCursorPosition (SCORC) is a sequence for restoring the current cursor position for SCO console mode. CSI u This acts like [DECRC], except the page number where the cursor was saved is not restored. See: https://vt100.net/docs/vt510-rm/SCORC.html
RestoreCursor (DECRC) is an escape sequence that restores the cursor position. ESC 8 See: https://vt100.net/docs/vt510-rm/DECRC.html
RestoreCursorPosition (RCP or SCORC) is a sequence for restoring the cursor position. CSI u This acts like Restore, except the cursor stays on the same page where the cursor was saved. See: https://vt100.net/docs/vt510-rm/SCORC.html Deprecated: use [RestoreCurrentCursorPosition] instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
ReverseIndex (RI) is an escape sequence for moving the cursor up one line in the same column. If the cursor is at the top margin, the screen scrolls down. This has the same effect as [RI].
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
RI is the reverse index character.
ResetInitialState (RIS) resets the terminal to its initial state. ESC c See: https://vt100.net/docs/vt510-rm/RIS.html
RS is the record separator character (Caret: ^^).
SaveCurrentCursorPosition (SCOSC) is a sequence for saving the current cursor position for SCO console mode. CSI s This acts like [DECSC], except the page number where the cursor is located is not saved. See: https://vt100.net/docs/vt510-rm/SCOSC.html
SaveCursor (DECSC) is an escape sequence that saves the current cursor position. ESC 7 See: https://vt100.net/docs/vt510-rm/DECSC.html
Save Cursor Mode saves the cursor position. Deprecated: use [ModeSaveCursor] instead.
SaveCursorPosition (SCP or SCOSC) is a sequence for saving the cursor position. CSI s This acts like Save, except the page number where the cursor is located is not saved. See: https://vt100.net/docs/vt510-rm/SCOSC.html Deprecated: use [SaveCurrentCursorPosition] instead.
SCI is the single character introducer character.
RestoreCurrentCursorPosition (SCORC) is a sequence for restoring the current cursor position for SCO console mode. CSI u This acts like [DECRC], except the page number where the cursor was saved is not restored. See: https://vt100.net/docs/vt510-rm/SCORC.html
SaveCurrentCursorPosition (SCOSC) is a sequence for saving the current cursor position for SCO console mode. CSI s This acts like [DECSC], except the page number where the cursor is located is not saved. See: https://vt100.net/docs/vt510-rm/SCOSC.html
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
Alternate Screen Buffer mode. Deprecated: use [ModeAltScreenSaveCursor] instead.
Alternate Screen Mode determines whether the alternate screen buffer is active. Deprecated: use [ModeAltScreen] instead.
Alternate Screen Save Cursor Mode saves the cursor position and switches to alternate screen. Deprecated: use [ModeAltScreenSaveCursor] instead.
Any Event Mouse Tracking reports all motion events. Deprecated: use [ModeMouseAnyEvent] instead.
Auto Wrap Mode (DECAWM) determines whether the cursor wraps to the next line. Deprecated: use [ModeAutoWrap] instead.
Backarrow Key Mode (DECBKM) determines whether the backspace key sends backspace or delete. Deprecated: use [ModeBackarrowKey] instead.
BiDirectional Support Mode (BDSM) determines whether the terminal supports bidirectional text. Deprecated: use [ModeBiDirectionalSupport] instead.
Bracketed Paste Mode determines whether pasted text is bracketed with escape sequences. Deprecated: use [ModeBracketedPaste] instead.
Button Event Mouse Tracking reports button-motion events when a button is pressed. Deprecated: use [ModeMouseButtonEvent] instead.
Cursor Keys Mode (DECCKM) determines whether cursor keys send ANSI or application sequences. Deprecated: use [ModeCursorKeys] instead.
Focus Event Mode determines whether the terminal reports focus and blur events. Deprecated: use [ModeFocusEvent] instead.
Grapheme Clustering Mode determines whether the terminal looks for grapheme clusters. Deprecated: use [ModeUnicodeCore], [SetModeUnicodeCore], [ResetModeUnicodeCore], and [RequestModeUnicodeCore] instead.
Highlight Mouse Tracking determines whether the mouse reports on button presses and highlighted cells. Deprecated: use [ModeMouseHighlight] instead.
In Band Resize Mode reports terminal resize events as escape sequences. Deprecated: use [ModeInBandResize] instead.
SetIndeterminateProgressBar is a sequence that sets the progress bar to the indeterminate state. OSC 9 ; 4 ; 3 BEL See: https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
Insert/Replace Mode (IRM) determines whether characters are inserted or replaced. Deprecated: use [ModeInsertReplace] instead.
Keyboard Action Mode (KAM) controls locking of the keyboard. Deprecated: use [ModeKeyboardAction] instead.
Left Right Margin Mode (DECLRMM) determines whether left and right margins can be set. Deprecated: use [ModeLeftRightMargin] instead.
Light Dark Mode enables reporting the operating system's color scheme preference. Deprecated: use [ModeLightDark] instead.
Line Feed/New Line Mode (LNM) determines whether the terminal interprets line feed as new line. Deprecated: use [ModeLineFeedNewLine] instead.
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
Alternate Screen Mode is a mode that determines whether the alternate screen buffer is active. When this mode is enabled, the alternate screen buffer is cleared. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Alternate Screen Save Cursor Mode is a mode that saves the cursor position as in [ModeSaveCursor], switches to the alternate screen buffer as in [ModeAltScreen], and clears the screen on switch. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Auto Wrap Mode (DECAWM) is a mode that determines whether the cursor wraps to the next line when it reaches the right margin. See: https://vt100.net/docs/vt510-rm/DECAWM.html
Backarrow Key Mode (DECBKM) is a mode that determines whether the backspace key sends a backspace or delete character. Disabled by default. See: https://vt100.net/docs/vt510-rm/DECBKM.html
BiDirectional Support Mode (BDSM) is a mode that determines whether the terminal supports bidirectional text. When enabled, the terminal supports bidirectional text and is set to implicit bidirectional mode. When disabled, the terminal does not support bidirectional text. See ECMA-48 7.2.1.
Bracketed Paste Mode is a mode that determines whether pasted text is bracketed with escape sequences. See: https://cirw.in/blog/bracketed-paste See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Bracketed-Paste-Mode
Cursor Keys Mode (DECCKM) is a mode that determines whether the cursor keys send ANSI cursor sequences or application sequences. See: https://vt100.net/docs/vt510-rm/DECCKM.html
Focus Event Mode is a mode that determines whether the terminal reports focus and blur events. The terminal sends the following encoding: CSI I // Focus In CSI O // Focus Out See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Focus-Tracking
ModeInBandResize is a mode that reports terminal resize events as escape sequences. This is useful for systems that do not support [SIGWINCH] like Windows. The terminal then sends the following encoding: CSI 48 ; cellsHeight ; cellsWidth ; pixelHeight ; pixelWidth t See: https://gist.github.com/rockorager/e695fb2924d36b2bcf1fff4a3704bd83
Insert/Replace Mode (IRM) is a mode that determines whether characters are inserted or replaced when typed. When enabled, characters are inserted at the cursor position pushing the characters to the right. When disabled, characters replace the character at the cursor position. See: https://vt100.net/docs/vt510-rm/IRM.html
Keyboard Action Mode (KAM) is a mode that controls locking of the keyboard. When the keyboard is locked, it cannot send data to the terminal. See: https://vt100.net/docs/vt510-rm/KAM.html
Left Right Margin Mode (DECLRMM) is a mode that determines whether the left and right margins can be set with [DECSLRM]. See: https://vt100.net/docs/vt510-rm/DECLRMM.html
ModeLightDark is a mode that enables reporting the operating system's color scheme (light or dark) preference. It reports the color scheme as a [DSR] and [LightDarkReport] escape sequences encoded as follows: CSI ? 997 ; 1 n for dark mode CSI ? 997 ; 2 n for light mode The color preference can also be requested via the following [DSR] and [RequestLightDarkReport] escape sequences: CSI ? 996 n See: https://contour-terminal.org/vt-extensions/color-palette-update-notifications/
Line Feed/New Line Mode (LNM) is a mode that determines whether the terminal interprets the line feed character as a new line. When enabled, the terminal interprets the line feed character as a new line. When disabled, the terminal interprets the line feed character as a line feed. A new line moves the cursor to the first position of the next line. A line feed moves the cursor down one line without changing the column scrolling the screen if necessary. See: https://vt100.net/docs/vt510-rm/LNM.html
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Any Event Mouse Tracking is the same as [ModeMouseButtonEvent], except that all motion events are reported even if no mouse buttons are pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Button Event Mouse Tracking is essentially the same as [ModeMouseNormal], but it also reports button-motion events when a button is pressed. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters. The terminal responds with the following encoding: CSI < Cb ; Cx ; Cy M Where Cb is the same as [ModeMouseNormal], and Cx and Cy are the x and y. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
SGR Pixel Extended Mouse Mode is a mode that changes the mouse tracking encoding to use SGR parameters with pixel coordinates. This is similar to [ModeMouseExtSgr], but also reports pixel coordinates. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
URXVT Extended Mouse Mode is a mode that changes the mouse tracking encoding to use an alternate encoding. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
UTF-8 Extended Mouse Mode is a mode that changes the mouse tracking encoding to use UTF-8 parameters. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Highlight Mouse Tracking is a mode that determines whether the mouse reports on button presses, releases, and highlighted cells. It uses the same encoding as [ModeMouseNormal] with a few differences: On highlight events, the terminal responds with the following encoding: CSI t CxCy CSI T CxCyCxCyCxCy Where the parameters are startx, starty, endx, endy, mousex, and mousey.
Normal Mouse Mode is a mode that determines whether the mouse reports on button presses and releases. It will also report modifier keys, wheel events, and extra buttons. It uses the same encoding as [ModeMouseX10] with a few differences: See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
X10 Mouse Mode is a mode that determines whether the mouse reports on button presses. The terminal responds with the following encoding: CSI M CbCxCy Where Cb is the button-1, where it can be 1, 2, or 3. Cx and Cy are the x and y coordinates of the mouse event. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
Numeric Keypad Mode (DECNKM) is a mode that determines whether the keypad sends application sequences or numeric sequences. This works like [DECKPAM] and [DECKPNM], but uses different sequences. See: https://vt100.net/docs/vt510-rm/DECNKM.html
Origin Mode (DECOM) is a mode that determines whether the cursor moves to the home position or the margin position. See: https://vt100.net/docs/vt510-rm/DECOM.html
Save Cursor Mode is a mode that saves the cursor position. This is equivalent to [SaveCursor] and [RestoreCursor]. See: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
Synchronized Output Mode is a mode that determines whether output is synchronized with the terminal. See: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036
Text Cursor Enable Mode (DECTCEM) is a mode that shows/hides the cursor. See: https://vt100.net/docs/vt510-rm/DECTCEM.html
Unicode Core Mode is a mode that determines whether the terminal should use Unicode grapheme clustering to calculate the width of glyphs for each terminal cell. See: https://github.com/contour-terminal/terminal-unicode-core
Win32Input is a mode that determines whether input is processed by the Win32 console and Conpty. See: https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
Modify Other Keys (modifyOtherKeys) is an xterm feature that allows the terminal to modify the behavior of certain keys to send different escape sequences when pressed. See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
Modify Other Keys (modifyOtherKeys) is an xterm feature that allows the terminal to modify the behavior of certain keys to send different escape sequences when pressed. See: https://invisible-island.net/xterm/manpage/xterm.html#VT100-Widget-Resources:modifyOtherKeys
Normal Mouse Mode determines whether the mouse reports on button presses and releases. Deprecated: use [ModeMouseNormal] instead.
Numeric Keypad Mode (DECNKM) determines whether the keypad sends application or numeric sequences. Deprecated: use [ModeNumericKeypad] instead.
Origin Mode (DECOM) determines whether the cursor moves to home or margin position. Deprecated: use [ModeOrigin] instead.
Save Cursor Mode saves the cursor position. Deprecated: use [ModeSaveCursor] instead.
Send Receive Mode (SRM) or Local Echo Mode determines whether the terminal echoes characters. Deprecated: use [ModeSendReceive] instead.
SGR Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters. Deprecated: use [ModeMouseExtSgr] instead.
SGR Pixel Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters with pixel coordinates. Deprecated: use [ModeMouseExtSgrPixel] instead.
Synchronized Output Mode determines whether output is synchronized with the terminal. Deprecated: use [ModeSynchronizedOutput] instead.
SetTabEvery8Columns (DECST8C) sets the tab stops at every 8 columns. CSI ? 5 W See: https://vt100.net/docs/vt510-rm/DECST8C.html
Text Cursor Enable Mode (DECTCEM) shows/hides the cursor. Deprecated: use [ModeTextCursorEnable] instead.
Unicode Core Mode determines whether the terminal uses Unicode grapheme clustering. Deprecated: use [ModeUnicodeCore] instead.
URXVT Extended Mouse Mode changes the mouse tracking encoding to use an alternate encoding. Deprecated: use [ModeMouseUrxvtExt] instead.
UTF-8 Extended Mouse Mode changes the mouse tracking encoding to use UTF-8 parameters. Deprecated: use [ModeMouseExtUtf8] instead.
Win32Input determines whether input is processed by the Win32 console and Conpty. Deprecated: use [ModeWin32Input] instead.
X10 Mouse Mode determines whether the mouse reports on button presses. Deprecated: use [ModeMouseX10] instead.
SGCI is the single graphic character introducer character.
SGR Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters. Deprecated: use [ModeMouseExtSgr] instead.
SGR Pixel Extended Mouse Mode changes the mouse tracking encoding to use SGR parameters with pixel coordinates. Deprecated: use [ModeMouseExtSgrPixel] instead.
These are aliases for [SetModeTextCursorEnable] and [ResetModeTextCursorEnable].
SI is the shift in character (Caret: ^O).
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SO is the shift out character (Caret: ^N).
SOH is the start of heading character (Caret: ^A).
SOS is the start of string character.
SP is the space character (Char: \x20).
SPA is the start of guarded area character.
Send Receive Mode (SRM) or Local Echo Mode is a mode that determines whether the terminal echoes characters back to the host. When enabled, the terminal sends characters to the host as they are typed. See: https://vt100.net/docs/vt510-rm/SRM.html
SS2 is the single shift 2 character.
SS3 is the single shift 3 character.
SSA is the start of selected area character.
ST is the string terminator character.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
ANSI escape sequence states used by [DecodeSequence].
STS is the set transmit state character.
STX is the start of text character (Caret: ^B).
SUB is the substitute character (Caret: ^Z).
SYN is the synchronous idle character (Caret: ^V).
Synchronized output mode. Deprecated: use [ModeSynchronizedOutput], [SetModeSynchronizedOutput], [ResetModeSynchronizedOutput], and [RequestModeSynchronizedOutput] instead.
Synchronized Output Mode determines whether output is synchronized with the terminal. Deprecated: use [ModeSynchronizedOutput] instead.
Clipboard names.
Text Cursor Enable Mode (DECTCEM) shows/hides the cursor. Deprecated: use [ModeTextCursorEnable] instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Underline styles constants.
Underline styles constants.
Underline styles constants.
Underline styles constants.
Underline styles constants.
Underline styles constants.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Underline styles constants. Deprecated: use [UnderlineNone], [UnderlineSingle], etc. instead.
Unicode Core Mode determines whether the terminal uses Unicode grapheme clustering. Deprecated: use [ModeUnicodeCore] instead.
URXVT Extended Mouse Mode changes the mouse tracking encoding to use an alternate encoding. Deprecated: use [ModeMouseUrxvtExt] instead.
US is the unit separator character (Caret: ^_).
UTF-8 Extended Mouse Mode changes the mouse tracking encoding to use UTF-8 parameters. Deprecated: use [ModeMouseExtUtf8] instead.
VT is the vertical tab character (Caret: ^K, Char: \v).
VTS is the vertical tab set character.
Display width modes.
White is the ANSI white color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
Win32Input determines whether input is processed by the Win32 console and Conpty. Deprecated: use [ModeWin32Input] instead.
X10 Mouse Mode determines whether the mouse reports on button presses. Deprecated: use [ModeMouseX10] instead.
RequestNameVersion (XTVERSION) is a control sequence that requests the terminal's name and version. It responds with a DSR sequence identifying the terminal. CSI > 0 q DCS > | text ST See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-PC-Style-Function-Keys
Yellow is the ANSI yellow color.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.
SGR (Select Graphic Rendition) style attributes. Deprecated: use Attr* constants instead.