Skip to content

CursorMoveToken ​

Namespace: Hex1b.Tokens

Assembly: Hex1b.dll

Represents a CSI cursor movement command.

csharp
public sealed record CursorMoveToken : AnsiToken, IEquatable<AnsiToken>, IEquatable<CursorMoveToken>

Inheritance ​

Object → AnsiToken → CursorMoveToken

Implements ​

Constructors ​

CursorMoveToken(CursorMoveDirection, int) ​

Represents a CSI cursor movement command.

Parameters:

csharp
public CursorMoveToken(CursorMoveDirection Direction, int Count = 1)

Properties ​

Count ​

Number of cells/lines to move. Default is 1.

Returns: Int32

csharp
public int Count { get; init; }

Direction ​

The direction to move.

Returns: CursorMoveDirection

csharp
public CursorMoveDirection Direction { get; init; }

Remarks ​

Covers the following ANSI sequences: ESC [ n A - Cursor Up (CUU)ESC [ n B - Cursor Down (CUD)ESC [ n C - Cursor Forward (CUF)ESC [ n D - Cursor Back (CUB)ESC [ n E - Cursor Next Line (CNL)ESC [ n F - Cursor Previous Line (CPL)

If n is omitted or 0, it defaults to 1.

Released under the MIT License.