Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Class

ConsoleKeyReader

class ConsoleKeyReader

Module: System
Assembly: System.Runtime.dll
Source file: ConsoleKeyReader.rvn

Inheritance: Object → ConsoleKeyReader
Implements: Disposable

Exclusive synchronous key input. Use a disposal scope to restore terminal settings.

Remarks

Open through Console.OpenKeyInput before using text input. Reads do not echo. One serialized caller per session. Current native support is POSIX on the invocation entry thread. A legacy Escape prefix uses a 30 ms inter-byte timeout; incomplete UTF-8 waits for completion or EOF.

Methods

7 items
Close() -> Result<void, ConsoleKeyError> Restores terminal modes. A failed restoration can be retried.
Dispose() -> () Closes the session; invocation cleanup retries restoration after an I/O failure. Implements Disposable.Dispose
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
ReadKey() -> Result<Optional<ConsoleKeyInfo>, ConsoleKeyError> Blocks for one key without echo, returning None at terminal EOF.
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString