ConsoleKeyInfo
Describes the console key that was pressed, including the character represented by the console key and the state of the SHIFT, ALT, and CTRL modifier keys.
Implements:
Public:
Types:
Name | Description |
---|
ConsoleKey |
A list of all the scankey codes.
|
ConsoleModifiers |
Values that represent the specific modifier keys
used to indicate different values for specific keys.
|
Properties:
Name | Description |
---|
Key (get) |
Returns the scankey code of the pressed key.
|
KeyChar (get) |
Returns the Unicode character of the pressed key.
|
Modifiers (get) |
Returns the state of the key modifiers (Shift, Alt, Control) at the time of the key press.
|
Methods:
Remarks
When a key pressed on a console, a ConsoleKeyInfo
object is generated by reading the pressed key using the ReadKey
method. The generated object contains the key press information
describing the event.
See Also
Project CorLib Overview
Class ConsoleKeyInfo Overview
Console