ArrowKeyToken
Namespace: Hex1b.Tokens
Assembly: Hex1b.dll
Represents an arrow key input with optional modifiers.
csharp
public sealed record ArrowKeyToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<ArrowKeyToken>Inheritance
Object → AnsiToken → ArrowKeyToken
Implements
Constructors
ArrowKeyToken(CursorMoveDirection, int)
Represents an arrow key input with optional modifiers.
Parameters:
Direction(CursorMoveDirection): The arrow key direction.Modifiers(Int32): The modifier code (1=none, 2=Shift, 3=Alt, 5=Ctrl, etc.).
csharp
public ArrowKeyToken(CursorMoveDirection Direction, int Modifiers = 1)Properties
Direction
The arrow key direction.
Returns: CursorMoveDirection
csharp
public CursorMoveDirection Direction { get; init; }Modifiers
The modifier code (1=none, 2=Shift, 3=Alt, 5=Ctrl, etc.).
Returns: Int32
csharp
public int Modifiers { get; init; }Remarks
Arrow key sequences with modifiers use the format ESC [ 1 ; m X where: X is A (Up), B (Down), C (Right), or D (Left)m is the modifier code: 1=none, 2=Shift, 3=Alt, 4=Shift+Alt, 5=Ctrl, 6=Shift+Ctrl, 7=Alt+Ctrl, 8=Shift+Alt+Ctrl
Plain arrow keys (no modifiers) are still represented as . This token is specifically for arrow keys with modifiers, to preserve modifier information that would otherwise be lost in .