ReadKeyAsync(bool, CancellationToken) Method
Reads a key from the console.
Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
- Namespace
- Spectre
.Console - Containing Type
- IAnsiConsoleInput
Parameters
- bool intercept
- Whether or not to intercept the key.
- CancellationToken cancellationToken
- The token to monitor for cancellation requests.
Returns
-
Task
< Console Key Info?>