Class KeyboardKeyEventArgs
Defines the event data for KeyboardDevice events.
Inheritance
Inherited Members
Namespace: OpenTK.Input
Assembly: cs.temp.dll.dll
Syntax
public class KeyboardKeyEventArgs : EventArgs
Remarks
Do not cache instances of this type outside their event handler. If necessary, you can clone a KeyboardEventArgs instance using the KeyboardKeyEventArgs(KeyboardKeyEventArgs) constructor.
Constructors
KeyboardKeyEventArgs()
Constructs a new KeyboardEventArgs instance.
Declaration
public KeyboardKeyEventArgs()
KeyboardKeyEventArgs(KeyboardKeyEventArgs)
Constructs a new KeyboardEventArgs instance.
Declaration
public KeyboardKeyEventArgs(KeyboardKeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
KeyboardKeyEventArgs | args | An existing KeyboardEventArgs instance to clone. |
Properties
Alt
Gets a value indicating whether Alt is pressed.
Declaration
public bool Alt { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Control
Gets a value indicating whether Control is pressed.
Declaration
public bool Control { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsRepeat
Gets a System.Boolean indicating whether this key event is a repeat.
Declaration
public bool IsRepeat { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true, if this event was caused by the user holding down a key; false, if this was caused by the user pressing a key for the first time. |
Key
Gets the Key that generated this event.
Declaration
public Key Key { get; }
Property Value
Type | Description |
---|---|
Key |
Keyboard
Gets the current KeyboardState.
Declaration
public KeyboardState Keyboard { get; }
Property Value
Type | Description |
---|---|
KeyboardState | The keyboard. |
Modifiers
Gets a bitwise combination representing the KeyModifiers that are currently pressed.
Declaration
public KeyModifiers Modifiers { get; }
Property Value
Type | Description |
---|---|
KeyModifiers | The modifiers. |
ScanCode
Gets the scancode which generated this event.
Declaration
[CLSCompliant(false)]
public uint ScanCode { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
Shift
Gets a value indicating whether Shift is pressed.
Declaration
public bool Shift { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|