public class JXGrabKey extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addHotkeyListener(HotkeyListener listener)
Adds a HotkeyListener.
|
void |
cleanUp()
Unregisters all hotkeys, removes all HotkeyListeners,
stops the main listen loop and deinitializes the singleton.
|
static void |
debugCallback(String debugmessage)
Either gives debug messages to a HotkeyListenerDebugEnabled if registered,
or prints to console otherwise.
|
static void |
fireKeyEvent(int id)
Notifies HotkeyListeners about a received KeyEvent.
|
static JXGrabKey |
getInstance()
Retrieves the singleton.
|
void |
registerAwtHotkey(int id,
int awtMask,
int awtKey)
Converts an AWT hotkey into a X11 hotkey and registers it.
|
void |
registerX11Hotkey(int id,
int x11Mask,
int x11Keysym)
Registers a X11 hotkey.
|
void |
removeHotkeyListener(HotkeyListener listener)
Removes a HotkeyListener.
|
static void |
setDebugOutput(boolean enabled)
Enables/Disables printing of debug messages.
|
void |
unregisterHotKey(int id)
This method unregisters a hotkey.
|
public static JXGrabKey getInstance()
public void addHotkeyListener(HotkeyListener listener)
listener - public void removeHotkeyListener(HotkeyListener listener)
listener - public void cleanUp()
public void registerX11Hotkey(int id,
int x11Mask,
int x11Keysym)
throws HotkeyConflictException
id - x11Mask - x11Keysym - HotkeyConflictExceptionpublic void registerAwtHotkey(int id,
int awtMask,
int awtKey)
throws HotkeyConflictException
id - awtMask - awtKey - HotkeyConflictExceptionpublic static void setDebugOutput(boolean enabled)
enabled - public static void fireKeyEvent(int id)
id - public static void debugCallback(String debugmessage)
debugmessage - public void unregisterHotKey(int id)
id -