NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

KeyEventArgs.KeyData

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;

Property Value

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.

Remarks

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.

See Also

KeyEventArgs Class | KeyEventArgs Members | System.WinForms Namespace | KeyCode