UseRawMode(TerminalRawModeKind) Method

Definition

Assembly XenoAtom.Terminal.dll

Enables raw/cbreak mode within a scope and restores the previous mode when disposed.

public TerminalScope UseRawMode(TerminalRawModeKind kind = TerminalRawModeKind.CBreak)

Parameters

kind
TerminalRawModeKind

The raw mode kind (use CBreak as the portable default for TUIs).

Returns

TerminalScope
A scope that restores the previous mode on dispose.

Remarks

CBreak disables canonical input and echo. On Unix it also disables software flow control (so Ctrl+S/Ctrl+Q are delivered as keys) and disables CR-to-NL translation (so Enter typically yields '\r'). Raw is more invasive (Unix cfmakeraw) and can change how newlines are handled.