Enables or disable specific types of keys.
- Key
An enumKeys value which determines the type of keys.Value Description KEYS_ACCELERATORS Accelerator keys such as Ctrl-S to save the file. KEYS_ACCELERATORS_FORWARD Forward accelerator key messages to the Key Events. KEYS_SYSTEM System keys such as Break. KEYS_SYSTEM_FORWARD Forward system key messages to the Key Events. - newVal
- A boolean value which is True to enable a specific type of key, False is disabled.
-
When KeysSetEnabled is True for the special keys, the keys will be processed by the default container handling.
-
When KeysSetEnabled is False for the special keys, the keys will not be processed by the default container handling.
-
When KeysSetEnabled is True for the key forwards, then the special keys will be forwarded to the regular ImagXpress Key Events provided that the Key Events are enabled with the EventSetEnabled method.
-
When KeysSetEnabled is False for the key forwards, then the special keys will NOT be forwarded to the regular Key Events no matter how the Key Events are set with the EventSetEnabled method.
VB Example showing KeysGetEnabled/KeysSetEnabled (Visual Basic) | Copy Code |
---|---|
‘ Alt+F4 will now exit Application when Alt+F4 is pressed and ImagXpress has the focus. ImagXpress1.KeysSetEnabled(KEYS_SYSTEM, TRUE) ‘ Determine if pressing TAB key will change focus to next control. Enabled = ImagXpress1.KeysGetEnabled(KEYS_ACCELERATOR) ' Don’t fire the ImagXpress key events when Alt+F4 is pressed. ImagXpress1.KeysSetEnabled(KEYS_SYSTEM_FORWARD, FALSE) ‘ Determine if the key events will be fired by pressing a TAB key. Enabled = ImagXpress1.KeysGetEnabled(KEYS_ACCELERATOR_FORWARD) |