Skip to main content
Version: 4.1

KeyEventArgs

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Provides data for the KeyDown or KeyUp event.

public class KeyEventArgs : EventArgs

Constructors​

Instance member KeyEventArgs(keyData)​

Initializes a new instance of the KeyEventArgs class.

NameTypeDescription
keyDataKeysA Keys representing the key that was pressed, combined with any modifier flags that indicate which CTRL, SHIFT, and ALT keys were pressed at the same time. Possible values are obtained be applying the bitwise OR (|) operator to constants from the Keys enumeration.

Properties​

Instance member Alt​

Boolean: Returns whether the ALT key was pressed.

Value: true if the ALT key was pressed; otherwise, false.

Instance member Control​

Boolean: Returns whether the CTRL key was pressed.

Value: true if the CTRL key was pressed; otherwise, false.

Instance member Handled​

Boolean: Returns or sets whether the event was handled.

Value: true to bypass the control's default handling; otherwise, false to also pass the event along to the default control handler.

Instance member KeyCode​

Keys: Returns the keyboard code..

Value: A Keys value that is the key code for the event.

Instance member KeyData​

Keys: Returns the key data.

Value: A Keys representing the key code for the key that was pressed, combined with modifier flags that indicate which combination of CTRL, SHIFT, and ALT keys was pressed at the same time.

Instance member KeyValue​

Int32: Returns the keyboard value.

Value: The integer representation of the KeyCode property.

Instance member Modifiers​

Keys: Returns the modifier flags indicating which combination of CTRL, SHIFT, and ALT keys was pressed.

Value: A Keys value representing one or more modifier flags.

Instance member Shift​

Boolean: Returns a value indicating whether the SHIFT key was pressed.

Value: true if the SHIFT key was pressed; otherwise, false.

Methods​

Instance member IsAltPressed()​

Returns whether the Alt key is pressed.

Returns: Boolean.

Instance member IsCtrlPressed()​

Returns whether the Control key is pressed.

Returns: Boolean.

Instance member IsShiftPressed()​

Returns whether the Shift key is pressed.

Returns: Boolean.

Used By​

NameDescription
KeyEventHandlerRepresents the method that will handle the KeyUp or KeyDown event of a Control.