Struct KeyboardKeyEventArgs
Defines the event data for
Inherited Members
Namespace: OpenTK.Windowing.Common
Assembly: OpenTK.Windowing.Desktop.dll
Syntax
public readonly struct KeyboardKeyEventArgs
Constructors
KeyboardKeyEventArgs(Keys, int, KeyModifiers, bool)
Initializes a new instance of the KeyboardKeyEventArgs struct.
Declaration
public KeyboardKeyEventArgs(Keys key, int scanCode, KeyModifiers modifiers, bool isRepeat)
Parameters
Type | Name | Description |
---|---|---|
Keys | key | The key that generated this event. |
int | scanCode | The scan code of the key that generated this event. |
KeyModifiers | modifiers | The key modifiers that were active when this event was generated. |
bool | isRepeat | Whether this event is a repeat from the user holding the key down. |
Properties
Alt
Gets a value indicating whether
Declaration
public bool Alt { get; }
Property Value
Type | Description |
---|---|
bool |
|
Command
Gets a value indicating whether
Declaration
public bool Command { get; }
Property Value
Type | Description |
---|---|
bool |
|
Control
Gets a value indicating whether
Declaration
public bool Control { get; }
Property Value
Type | Description |
---|---|
bool |
|
IsRepeat
Gets a value indicating whether this key event is a repeat.
Declaration
public bool IsRepeat { get; }
Property Value
Type | Description |
---|---|
bool | 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 Keys Key { get; }
Property Value
Type | Description |
---|---|
Keys |
Modifiers
Gets a bitwise combination representing the key modifiers were active when this event was generated.
Declaration
public KeyModifiers Modifiers { get; }
Property Value
Type | Description |
---|---|
KeyModifiers |
ScanCode
Gets the keyboard scan code of the key that generated this event.
Declaration
public int ScanCode { get; }
Property Value
Type | Description |
---|---|
int |
Shift
Gets a value indicating whether
Declaration
public bool Shift { get; }
Property Value
Type | Description |
---|---|
bool |
|