Table of Contents

Class KeyEventArgs

Namespace
NetEx.Hooks
Assembly
NetEx.Hooks.dll

Provides data for the KeyDown or KeyUp event.

public sealed class KeyEventArgs : EventArgs
Inheritance
KeyEventArgs
Inherited Members

Remarks

This code was taken from the .NET Framework.

Constructors

KeyEventArgs(Keys)

Initializes a new instance of the KeyEventArgs class.

public KeyEventArgs(Keys keyData)

Parameters

keyData Keys

Properties

Alt

Gets a value indicating whether the ALT key was pressed.

public bool Alt { get; }

Property Value

bool

Control

Gets a value indicating whether the CTRL key was pressed.

public bool Control { get; }

Property Value

bool

Handled

Gets or sets a value indicating whether the event was handled.

public bool Handled { get; set; }

Property Value

bool

KeyCode

Gets the keyboard code for a KeyDown or KeyUp event.

public Keys KeyCode { get; }

Property Value

Keys

KeyData

Gets the key data for a KeyDown or KeyUp event.

public Keys KeyData { get; }

Property Value

Keys

KeyValue

Gets the keyboard value for a KeyDown or KeyUp event.

public int KeyValue { get; }

Property Value

int

Modifiers

Gets the modifier flags for a KeyDown or KeyUp event. This indicates which modifier keys (CTRL, SHIFT, and/or ALT) were pressed.

public Keys Modifiers { get; }

Property Value

Keys

Shift

Gets a value indicating whether the SHIFT key was pressed.

public bool Shift { get; }

Property Value

bool

SuppressKeyPress

Gets or sets a value indicating whether the key event should be passed on to the next listener.

public bool SuppressKeyPress { get; set; }

Property Value

bool

true if the key event should not be sent to the control; otherwise, false.

See Also