Adding Hotkeys
How to add hotkeys using Hotkey Listener
Last updated
Was this helpful?
How to add hotkeys using Hotkey Listener
Last updated
Was this helpful?
First, ensure you import the library's namespace:
...then instantiate the class and add some hotkeys:
Hotkey Listener has its own built-in
Hotkey
class that lets you define modifiers and keys.
The Add()
method also allows adding an array of hotkeys:
Important: If you're building an application that has no external user-option for changing or customizing the default hotkey(s) set, something you'll need to consider when working with global hotkeys is that there are a number of predefined keys or key-combinations already in use within a number of applications such as - for example
Control
+Tab
. This then means that you might need to find the right key or key combination to use when shipping your applications.