HotKeyFieldKey ( hotkey )
Parameters
| hotkey - hotkey field gadget |
Description
|
Returns the key captured by a hotkey field, or 0 if the field is empty. Requires Extended language mode. Reads the key half of the combination the user pressed into a hotkey field, as a raw keyboard scan code - the same representation key events carry and HotKeyEvent accepts. HotKeyFieldModifiers reads the other half, the Shift/Control/Alt bits. The pair is what you save into your tool's settings and what you feed to HotKeyEvent to make the shortcut live: key=HotKeyFieldKey(field) If key<>0 Then HotKeyEvent key,HotKeyFieldModifiers(field),EV_DO_THING Test for 0 first - it means the user has not captured anything (or cleared the field), so there is nothing to bind. The query is silent; it posts no events. When the user changes the field, the field itself posts a critical $401 with the raw key in EventData and the modifiers in EventX, which is the natural moment to call this. See it working in the native input controls sample. See also: HotKeyFieldModifiers, CreateHotKeyField, SetHotKeyField, HotKeyEvent. |
Index