Class KeyEvent
Represents a key-press event.
Inheritance
System.Object
KeyEvent
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.System
Assembly: Cosmos.System2.dll
Syntax
public class KeyEvent
Constructors
| Improve this Doc View SourceKeyEvent()
Initializes a new instance of the KeyEvent class.
Declaration
public KeyEvent()
KeyEvent(Char, ConsoleKeyEx, Boolean, Boolean, Boolean, KeyEvent.KeyEventType)
Initializes a new instance of the KeyEvent class.
Declaration
public KeyEvent(char keyChar, ConsoleKeyEx key, bool shift, bool alt, bool control, KeyEvent.KeyEventType type)
Parameters
Type | Name | Description |
---|---|---|
System.Char | keyChar | The text character. |
ConsoleKeyEx | key | The virtual key. |
System.Boolean | shift | Whether the Shift key was pressed. |
System.Boolean | alt | Whether the Alt key was pressed. |
System.Boolean | control | Whether the Control (Ctrl) key was pressed. |
KeyEvent.KeyEventType | type | The type of the KeyEvent. |
Properties
| Improve this Doc View SourceKey
The virtual key of the key-press event.
Declaration
public ConsoleKeyEx Key { get; set; }
Property Value
Type | Description |
---|---|
ConsoleKeyEx |
KeyChar
The text character of the key-press event.
Declaration
public char KeyChar { get; set; }
Property Value
Type | Description |
---|---|
System.Char |
Modifiers
The modifiers of the key-press event.
Declaration
public ConsoleModifiers Modifiers { get; set; }
Property Value
Type | Description |
---|---|
System.ConsoleModifiers |
Type
The type of the key-press event.
Declaration
public KeyEvent.KeyEventType Type { get; set; }
Property Value
Type | Description |
---|---|
KeyEvent.KeyEventType |