Adding Hotkeys
How to add hotkeys using Hotkey Listener
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 Google Chrome - 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.
Last updated