KgpCommand
Namespace: Hex1b
Assembly: Hex1b.dll
Parsed KGP command from control data key=value pairs.
public sealed class KgpCommandInheritance
Object → KgpCommand
Properties
Action
The overall action (a key). Default: Transmit.
Returns: KgpAction
public KgpAction Action { get; init; }AnimationState
Animation state (s key for a=a). 1=stop, 2=loading, 3=run.
Returns: Int32
public int AnimationState { get; init; }CellOffsetX
X-offset within first cell in pixels (X key).
Returns: UInt32
public uint CellOffsetX { get; init; }CellOffsetY
Y-offset within first cell in pixels (Y key).
Returns: UInt32
public uint CellOffsetY { get; init; }Compression
Compression type (o key). 'z' for zlib, null for none.
Returns: Nullable<Char>
public char? Compression { get; init; }CursorMovement
Cursor movement policy (C key). 0=move cursor, 1=don't move.
Returns: Int32
public int CursorMovement { get; init; }DeleteTarget
Deletion target (d key). Default: All.
Returns: KgpDeleteTarget
public KgpDeleteTarget DeleteTarget { get; init; }DisplayColumns
Number of columns to display over (c key). 0=auto.
Returns: UInt32
public uint DisplayColumns { get; init; }DisplayRows
Number of rows to display over (r key). 0=auto.
Returns: UInt32
public uint DisplayRows { get; init; }FileOffset
Offset to read from file (O key).
Returns: UInt32
public uint FileOffset { get; init; }FileSize
Size of data to read from file (S key).
Returns: UInt32
public uint FileSize { get; init; }Format
Pixel data format (f key). Default: Rgba32.
Returns: KgpFormat
public KgpFormat Format { get; init; }Height
Image height in pixels (v key).
Returns: UInt32
public uint Height { get; init; }ImageId
Image ID (i key). 0 means unspecified.
Returns: UInt32
public uint ImageId { get; init; }ImageNumber
Image number (I key). 0 means unspecified.
Returns: UInt32
public uint ImageNumber { get; init; }LoopCount
Loop count (v key for a=a). 0=ignored, 1=infinite, n=n-1 loops.
Returns: UInt32
public uint LoopCount { get; init; }Medium
Transmission medium (t key). Default: Direct.
Returns: KgpTransmissionMedium
public KgpTransmissionMedium Medium { get; init; }MoreData
Whether more chunked data follows (m key). 0=last/only, 1=more.
Returns: Int32
public int MoreData { get; init; }ParentImageId
Parent image ID for relative placement (P key).
Returns: UInt32
public uint ParentImageId { get; init; }ParentOffsetH
Horizontal offset from parent in cells (H key).
Returns: Int32
public int ParentOffsetH { get; init; }ParentOffsetV
Vertical offset from parent in cells (V key).
Returns: Int32
public int ParentOffsetV { get; init; }ParentPlacementId
Parent placement ID for relative placement (Q key).
Returns: UInt32
public uint ParentPlacementId { get; init; }PlacementId
Placement ID (p key). 0 means unspecified.
Returns: UInt32
public uint PlacementId { get; init; }Quiet
Response suppression (q key). 0=normal, 1=suppress OK, 2=suppress all.
Returns: Int32
public int Quiet { get; init; }SourceHeight
Height of source rectangle in pixels (h key). 0=entire height.
Returns: UInt32
public uint SourceHeight { get; init; }SourceWidth
Width of source rectangle in pixels (w key). 0=entire width.
Returns: UInt32
public uint SourceWidth { get; init; }SourceX
Left edge of source rectangle in pixels (x key).
Returns: UInt32
public uint SourceX { get; init; }SourceY
Top edge of source rectangle in pixels (y key).
Returns: UInt32
public uint SourceY { get; init; }UnicodePlaceholder
Unicode placeholder mode (U key). 1=create virtual placement.
Returns: Int32
public int UnicodePlaceholder { get; init; }Width
Image width in pixels (s key).
Returns: UInt32
public uint Width { get; init; }ZIndex
Z-index for stacking order (z key).
Returns: Int32
public int ZIndex { get; init; }Methods
Parse(string)
Parses a KGP control data string into a .
Parameters:
controlData(String): Comma-separated key=value pairs (e.g., "a=T,f=24,s=10,v=20,i=1").
Returns: KgpCommand
A parsed with defaults for unspecified keys.
public static KgpCommand Parse(string controlData)Remarks
Protocol specification: https://sw.kovidgoyal.net/kitty/graphics-protocol/