KgpToken
Namespace: Hex1b.Tokens
Assembly: Hex1b.dll
Represents a Kitty Graphics Protocol (KGP) command: ESC _G ... ST
public sealed record KgpToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<KgpToken>Inheritance
Implements
Constructors
KgpToken(string, string)
Represents a Kitty Graphics Protocol (KGP) command: ESC _G ... ST
Parameters:
ControlData(String): The control data portion (comma-separated key=value pairs) before the semicolon.Payload(String): The base64-encoded payload after the semicolon, or empty if no payload.
public KgpToken(string ControlData, string Payload)Properties
ControlData
The control data portion (comma-separated key=value pairs) before the semicolon.
Returns: String
public string ControlData { get; init; }Payload
The base64-encoded payload after the semicolon, or empty if no payload.
Returns: String
public string Payload { get; init; }Remarks
KGP uses APC (Application Programming Command) escape sequences with a 'G' prefix: ESC _G <control data> ; <payload> ESC \
The control data contains comma-separated key=value pairs that describe the graphics command (action, format, dimensions, IDs, etc.). The payload is base64-encoded pixel data or file paths.
Protocol specification: https://sw.kovidgoyal.net/kitty/graphics-protocol/