Inherits from VI Events.
Generated when the user performs keystrokes on the keyboard. This event detects all key presses that occur anywhere on the front panel, such as typing text in a string control or pressing <Ctrl>, <Shift>, and so on. If you want to detect a key down event only on a specific control, use the Key Down event in the Control class.
The following table lists the event data fields for this event.
Event Data Field | Description |
---|---|
Type | Returns the type of event that occurred, such as Mouse Down, Value Changed, or Timeout. |
Time | Value of the millisecond timer when the event occurred. |
CtrlRef | Returns a reference to the control on which the event occurred. |
ScanCode | Returns the scan code unique for each key on the keyboard. The values are unique for each physical key, and allow you to match Key Up and Key Down events. |
Mods | Returns a cluster of Booleans that contain platform-independent modifiers. For key events, this event returns a Boolean indicating if the event occurred on the numeric keypad. For mouse events, this event returns a Boolean indicating if the event was a double-click. For both events, a Boolean is returned if the platform-independent menu key, such as <Ctrl> or <Option> was pressed when the event occured. You also can modify the data returned by this event data field. |
PlatMods | Returns a cluster of Booleans that contain platform-dependent modifiers. Specifies if platform-dependent keys, such as <Ctrl>, <Shift>, <Alt>, <Command>, and <Option> were held down when the event was triggered. You also can modify the data returned by this event data field. |
FocusObj | A reference to the object that has keyboard focus. When the event is for a control, it might be a sub-component, like a scale, label, and so on, rather than the control itself. |