Gets the key data for a System.WinForms.Control.KeyDown or System.WinForms.Control.KeyUp event.
[Visual Basic] Public ReadOnly Property KeyData As Keys [C#] public Keys KeyData {get;} [C++] public: __property Keys get_KeyData(); [JScript] public function get KeyData() : Keys;
The key code for the key that was pressed, combined with any modifier flags that indicate which CTRL, SHIFT, and/or ALT keys were pressed at the same time.
You can use constants from Keys to extract information from the KeyData property. Use the bitwise AND (&) operator to compare data returned by KeyData with constants in Keys to obtain information about which keys the user pressed. To determine whether a specific modifier key was pressed, use the Control, Shift, and Alt properties.
KeyEventArgs Class | KeyEventArgs Members | System.WinForms Namespace | KeyCode