Class KeyEventArgs
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
Control
Gets a value indicating whether the CTRL key was pressed.
public bool Control { get; }
Property Value
Handled
Gets or sets a value indicating whether the event was handled.
public bool Handled { get; set; }
Property Value
KeyCode
public Keys KeyCode { get; }
Property Value
KeyData
public Keys KeyData { get; }
Property Value
KeyValue
public int KeyValue { get; }
Property Value
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
Shift
Gets a value indicating whether the SHIFT key was pressed.
public bool Shift { get; }
Property Value
SuppressKeyPress
Gets or sets a value indicating whether the key event should be passed on to the next listener.
public bool SuppressKeyPress { get; set; }