Inherits from Control Events.
Generated on a control that has keyboard focus.
The following table lists the event data fields for this event.
Event Data Field | Description |
---|---|
Time | Value of the millisecond timer when the event occurred. |
CtrlRef | Returns a reference to the control on which the event occurred. |
Char | Returns an ASCII value that corresponds to the key pressed on the keyboard, or zero if the character is not an ASCII character. You also can modify the data returned by this event data field. |
VKey | Returns an enumerated type indicating the virtual key code of the key pressed. Values include ASCII, Shift, NumLock, F1, and so on. You also can modify the data received from this event data field. |
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. |
Discard | Allows you to prevent LabVIEW from processing the event, bypassing the behavior normally triggered by that event. |