|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjxgrabkey.JXGrabKey
public class JXGrabKey
This class implements the API access. All public methods are synchronized, hence thread-safe.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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
-
HotkeyConflictException
public void registerAwtHotkey(int id, int awtMask, int awtKey) throws HotkeyConflictException
id
- awtMask
- awtKey
-
HotkeyConflictException
public 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
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |