System.Windows.Forms.KeyEventArgs.KeyData Property

Gets the key data for a Control.KeyDown or Control.KeyUp event.

Syntax

public Keys KeyData { get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can use constants from System.Windows.Forms.Keys to extract information from the KeyEventArgs.KeyData property. Use the bitwise AND operator to compare data returned by KeyEventArgs.KeyData with constants in System.Windows.Forms.Keys to obtain information about which keys the user pressed. To determine whether a specific modifier key was pressed, use the KeyEventArgs.Control, KeyEventArgs.Shift, and KeyEventArgs.Alt properties.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0