Enabling Hotkey Selection For Controls
How to enable hotkey-selection for default Windows Controls and User Controls
Firstly off, instantiate a new HotkeySelector
instance:
To enable any control for hotkey selection, use the Enable()
method:
When enabling a control, you can set the default hotkey to be displayed:
...or we can create a new hotkey then set it as the default hotkey for a selector control:
To set a hotkey without necessarily enabling the control for hotkey selection, use the Set()
method:
HotkeySelector
also helps detect whether a hotkey or hotkey-combination is a Windows-registered hotkey or not and therefore unavailable for use - e.g.Control
+Alt
+Delete
. So no need to account for such scenarios. 😉
Let's move a little further...
Last updated