Hex1b.Tokens
Assembly: Hex1b.dll
Classes
AnsiToken
Base type for all ANSI terminal tokens.
public abstract record AnsiToken : IEquatable<AnsiToken>AnsiTokenizer
Parses ANSI text into a list of tokens.
public static class AnsiTokenizerAnsiTokenSerializer
Serializes ANSI tokens back into escape sequence strings.
public static class AnsiTokenSerializerAnsiTokenUtf8Serializer
Serializes ANSI tokens directly to UTF-8 bytes to avoid allocating intermediate strings.
public static class AnsiTokenUtf8SerializerAppliedToken
Represents a token that has been applied to the terminal buffer, bundled with metadata about what changed.
public record AppliedToken : IEquatable<AppliedToken>ArrowKeyToken
Represents an arrow key input with optional modifiers.
public sealed record ArrowKeyToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ArrowKeyToken>BackTabToken
Represents a Backtab (Shift+Tab) escape sequence (CSI Z).
public sealed record BackTabToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<BackTabToken>CharacterSetToken
Represents a character set designation sequence: ESC ( X or ESC ) X These sequences select which character set to use for the G0 or G1 character set.
public sealed record CharacterSetToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CharacterSetToken>ClearLineToken
Represents a CSI Erase in Line command (EL): ESC [ mode K or Selective Erase in Line (DECSEL): ESC [ ? mode K
public sealed record ClearLineToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ClearLineToken>ClearScreenToken
Represents a CSI Erase in Display command (ED): ESC [ mode J or Selective Erase in Display (DECSED): ESC [ ? mode J
public sealed record ClearScreenToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ClearScreenToken>ControlCharacterToken
Represents a control character (CR, LF, TAB, etc.).
public sealed record ControlCharacterToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ControlCharacterToken>CursorColumnToken
Represents a CSI Cursor Horizontal Absolute (CHA) command: ESC [ n G
public sealed record CursorColumnToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorColumnToken>CursorMoveToken
Represents a CSI cursor movement command.
public sealed record CursorMoveToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorMoveToken>CursorPositionToken
Represents a CSI cursor position command (CUP): ESC [ row ; col H
public sealed record CursorPositionToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorPositionToken>CursorRowToken
Represents a CSI Vertical Position Absolute (VPA) command: ESC [ n d
public sealed record CursorRowToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorRowToken>CursorShapeToken
Represents a CSI cursor shape command (DECSCUSR): ESC [ n SP q
public sealed record CursorShapeToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorShapeToken>DcsToken
Represents a Device Control String (DCS): ESC P ... ST
public sealed record DcsToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DcsToken>DecalnToken
Represents the DECALN (DEC Screen Alignment Test) escape sequence: ESC # 8. Fills the entire screen with 'E' characters and resets margins.
public sealed record DecalnToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DecalnToken>DecscaToken
Token for DECSCA (Select Character Protection Attribute): CSI Ps " q
public sealed record DecscaToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DecscaToken>DeleteCharacterToken
Represents a CSI Delete Character (DCH) command: ESC [ n P Deletes n characters at cursor, shifting remaining characters left.
public sealed record DeleteCharacterToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DeleteCharacterToken>DeleteColumnsToken
Represents DECDC column deletion.
public sealed record DeleteColumnsToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DeleteColumnsToken>DeleteLinesToken
Represents a CSI Delete Line (DL) command: ESC [ n M Deletes n lines at the cursor position, pulling lines up from below.
public sealed record DeleteLinesToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DeleteLinesToken>DeviceAttributesQueryToken
Represents a Primary Device Attributes (DA1) request: CSI c or CSI 0 c.
public sealed record DeviceAttributesQueryToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DeviceAttributesQueryToken>DeviceStatusReportToken
Represents a Device Status Report (DSR) request. ESC [ Ps n where Ps is the type of report requested. Common values:
- 5: Status report (terminal responds ESC [ 0 n for "ready")
- 6: Cursor position report (terminal responds ESC [ row ; col R)
public record DeviceStatusReportToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<DeviceStatusReportToken>EraseCharacterToken
Represents a CSI Erase Character (ECH) command: ESC [ n X Erases n characters from cursor without moving cursor or shifting.
public sealed record EraseCharacterToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<EraseCharacterToken>IndexToken
Represents an Index (IND) command: ESC D Moves the cursor down one line, scrolling if at the bottom margin.
public sealed record IndexToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<IndexToken>InsertCharacterToken
Represents a CSI Insert Character (ICH) command: ESC [ n @ Inserts n blank characters at cursor, shifting existing characters right.
public sealed record InsertCharacterToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<InsertCharacterToken>InsertColumnsToken
Represents DECIC or DECDC column editing.
public sealed record InsertColumnsToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<InsertColumnsToken>InsertLinesToken
Represents a CSI Insert Line (IL) command: ESC [ n L Inserts n blank lines at the cursor position, pushing existing lines down.
public sealed record InsertLinesToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<InsertLinesToken>KeypadModeToken
Represents an Application Keypad Mode sequence: ESC = Switches the keypad to application mode.
public sealed record KeypadModeToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<KeypadModeToken>KgpToken
Represents a Kitty Graphics Protocol (KGP) command: ESC _G ... ST
public sealed record KgpToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<KgpToken>LeftRightMarginToken
Represents a CSI Set Left Right Margins (DECSLRM) command: ESC [ left ; right s Sets the left and right margins for the scrolling region. Only active when DECLRMM (mode 69) is enabled.
public sealed record LeftRightMarginToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<LeftRightMarginToken>OscToken
Represents an Operating System Command (OSC): ESC ] command ; params ; payload ST
public sealed record OscToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<OscToken>PrivateModeToken
Represents a CSI private mode set/reset command: ESC [ ? mode h/l
public sealed record PrivateModeToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<PrivateModeToken>RectangularEraseToken
Represents DECERA or DECSERA rectangular erase.
public sealed record RectangularEraseToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<RectangularEraseToken>RepeatCharacterToken
Represents a CSI Repeat (REP) command: ESC [ n b Repeats the previous graphic character n times.
public sealed record RepeatCharacterToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<RepeatCharacterToken>RestoreCursorToken
Represents a cursor restore command: ESC 8 (DECRC) or ESC [ u (ANSI.SYS)
public sealed record RestoreCursorToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<RestoreCursorToken>ReverseIndexToken
Represents a Reverse Index (RI) command: ESC M Moves the cursor up one line, scrolling if at the top margin.
public sealed record ReverseIndexToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ReverseIndexToken>RisToken
Token for RIS (Reset to Initial State, ESC c) — full terminal reset.
public sealed record RisToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<RisToken>SaveCursorToken
Represents a cursor save command: ESC 7 (DECSC) or ESC [ s (ANSI.SYS)
public sealed record SaveCursorToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SaveCursorToken>ScrollDownToken
Represents a CSI Scroll Down (SD) command: ESC [ n T Scrolls the content down by n lines, inserting blank lines at the top.
public sealed record ScrollDownToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ScrollDownToken>ScrollRegionToken
Represents a CSI Set Scrolling Region command (DECSTBM): ESC [ top ; bottom r
public sealed record ScrollRegionToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ScrollRegionToken>ScrollUpToken
Represents a CSI Scroll Up (SU) command: ESC [ n S Scrolls the content up by n lines, inserting blank lines at the bottom.
public sealed record ScrollUpToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ScrollUpToken>SgrMouseToken
Represents an SGR (1006) mouse protocol sequence. Format: ESC [ < Cb ; Cx ; Cy M (press) or ESC [ < Cb ; Cx ; Cy m (release)
public sealed record SgrMouseToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SgrMouseToken>SgrToken
Represents a CSI Select Graphic Rendition command (SGR): ESC [ params m
public sealed record SgrToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SgrToken>SoftResetToken
Token for DECSTR (Soft Terminal Reset, CSI ! p).
public sealed record SoftResetToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SoftResetToken>SpecialKeyToken
Represents a function key or special key sequence in the format ESC [ n ~.
public sealed record SpecialKeyToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<SpecialKeyToken>Ss3Token
Represents an SS3 (Single Shift 3) escape sequence (ESC O followed by a character). SS3 sequences are used for function keys F1-F4 and arrow keys in application keypad mode.
public sealed record Ss3Token : AnsiToken, IEquatable<AnsiToken>, IEquatable<Ss3Token>StandardModeToken
Represents a CSI standard (non-private) mode set/reset command: ESC [ mode h/l
public sealed record StandardModeToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<StandardModeToken>TabClearToken
Represents a Tab Clear (TBC) sequence: CSI Ps g
public sealed record TabClearToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<TabClearToken>TextToken
Represents plain text content to be written at the current cursor position.
public sealed record TextToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<TextToken>UnrecognizedSequenceToken
Represents an unrecognized or unsupported escape sequence.
public sealed record UnrecognizedSequenceToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<UnrecognizedSequenceToken>WindowOperationToken
Represents an XTWINOPS window operation request: CSI Ps t.
public sealed record WindowOperationToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<WindowOperationToken>Structs
CellImpact
Captures a cell that was modified during token application.
public readonly record struct CellImpact : IEquatable<CellImpact>TerminalGraphicsImpact
Captures a terminal graphics placement or damage region.
public readonly record struct TerminalGraphicsImpact : IEquatable<TerminalGraphicsImpact>Enums
ClearMode
The mode for CSI clear screen (ED) and clear line (EL) commands.
public enum ClearModeCursorMoveDirection
Direction for relative cursor movement.
public enum CursorMoveDirectionTerminalGraphicsImpactKind
Identifies a terminal graphics state change reported to presentation adapters.
public enum TerminalGraphicsImpactKind