|
<< Click to Display Table of Contents >>
KeyDown |
KeyDown(KeyCode, Shift)
This event occurs when a key is pressed and an object has the keyboard focus. Notice that this event is not generated if an object is not enabled, that is, its Enabled property is set to False, or if this object does not have keyboard focus.
Parameters of the KeyDown event
Parameter |
Description |
|---|---|
KeyCode |
Integer identifying the ASCII character of the pressed key |
Shift |
Displays the shortcut key used with the pressed key. Possible values for this parameter are 4: SHIFT key, 8: CTRL key, or 12: CTRL + SHIFT keys |
NOTE |
For a list with all key codes available for the KeyCode parameter, please check the article Keys Enum on Microsoft Learn. |