Show / Hide Table of Contents

Class KeyboardKeyEventArgs

Defines the event data for KeyboardDevice events.

Inheritance
Object
EventArgs
KeyboardKeyEventArgs
Inherited Members
EventArgs.Empty
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: OpenTK.Input
Assembly: OpenTK.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
Boolean

true if pressed; otherwise, false.

Command

Gets a value indicating whether Command is pressed. Mac OS only.

Declaration
public bool Command { get; }
Property Value
Type Description
Boolean

true if pressed; otherwise, false.

Control

Gets a value indicating whether Control is pressed.

Declaration
public bool Control { get; }
Property Value
Type Description
Boolean

true if pressed; otherwise, false.

IsRepeat

Gets a Boolean indicating whether this key event is a repeat.

Declaration
public bool IsRepeat { get; }
Property Value
Type Description
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
UInt32

Shift

Gets a value indicating whether Shift is pressed.

Declaration
public bool Shift { get; }
Property Value
Type Description
Boolean

true if pressed; otherwise, false.

In This Article
Back to top Generated by DocFX