public interface GlobalShortcutService
Modifier and Type | Field and Description |
---|---|
static int |
SPECIAL_KEY_MODIFIERS
Value for AWTKeyStroke's modifiers that specify a "special" key shortcut.
|
Modifier and Type | Method and Description |
---|---|
java.awt.AWTKeyStroke |
getSpecialKey()
Get special keystroke or null if not supported or user cancels.
|
void |
registerShortcut(GlobalShortcutListener l,
java.awt.AWTKeyStroke keyStroke)
Registers an action to execute when the keystroke is typed.
|
void |
reloadGlobalShortcuts()
Reload global shortcuts.
|
void |
setEnable(boolean enable)
Enable or not global shortcut.
|
void |
setSpecialKeyDetection(boolean enable,
GlobalShortcutListener callback)
Enable or disable special key detection.
|
void |
unregisterShortcut(GlobalShortcutListener l,
java.awt.AWTKeyStroke keyStroke)
Unregisters an action to execute when the keystroke is typed.
|
static final int SPECIAL_KEY_MODIFIERS
void registerShortcut(GlobalShortcutListener l, java.awt.AWTKeyStroke keyStroke)
l
- listener to notify when keystroke is typedkeyStroke
- keystroke that will trigger the actionvoid unregisterShortcut(GlobalShortcutListener l, java.awt.AWTKeyStroke keyStroke)
l
- listener to removekeyStroke
- keystroke that will trigger the actionvoid setSpecialKeyDetection(boolean enable, GlobalShortcutListener callback)
enable
- enable or not special key detection.callback
- object to be notifiedjava.awt.AWTKeyStroke getSpecialKey()
void reloadGlobalShortcuts()
void setEnable(boolean enable)
enable
- enable or not global shortcut
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.