KeyDown event
Occurs when you press a key while the object has input focus. Key repeat events are ignored.
The KeyDown event is generated for an object before the event is generated for the display, but both will occur.
Syntax
object
_KeyDown
(ByVal
KeyCode
As Integer
, ByVal
Shift
As Integer
)where
object
– is the name of a display element of one of the following types: Button, NumericInput, Recipe, or StringInput.KeyCode
– is a constant of the type Integer, such as vbKeyF1 (the F1 key) or vbKeyHome (the Home key). To specify key codes use the constants in the Visual Basic object library.Shift
– is a parameter of the type Integer that corresponds to the state of the Shift and Ctrl keys at the time of the event.Provide Feedback