public class NativeKeyboardHook
extends java.lang.Object
Constructor and Description |
---|
NativeKeyboardHook()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
detectSpecialKeyPress(boolean enable)
Detect special key press.
|
boolean |
isSpecialKeyDetection()
Returns whether or not special key detection is enabled.
|
boolean |
registerShortcut(int keycode,
int modifiers,
boolean isOnKeyRelease)
Register a shortcut.
|
boolean |
registerSpecial(int keycode,
boolean isOnKeyRelease)
Register a special key shortcut (for example key coming from headset).
|
void |
setDelegate(NativeKeyboardHookDelegate delegate)
Set delegate object for event notification.
|
void |
start()
Start the NativeKeyboardHook.
|
void |
stop()
Stop the NativeKeyboardHook.
|
void |
unregisterShortcut(int keycode,
int modifiers)
Unregister a shortcut.
|
void |
unregisterSpecial(int keycode)
Unregister a special key shortcut (for example key coming from headset).
|
public void start()
public void stop()
public void setDelegate(NativeKeyboardHookDelegate delegate)
delegate
- delegate objectpublic boolean registerShortcut(int keycode, int modifiers, boolean isOnKeyRelease)
keycode
- keycode of the shortcutmodifiers
- modifiers (CTRL, ALT, ...)isOnKeyRelease
- this parameter should be true if when the shortcut
is released an action should be performed.public void unregisterShortcut(int keycode, int modifiers)
keycode
- keycode of the shortcutmodifiers
- modifiers (CTRL, ALT, ...)public boolean registerSpecial(int keycode, boolean isOnKeyRelease)
keycode
- keycode of the shortcutisOnKeyRelease
- this parameter should be true if when the shortcut
is released an action should be performed.public void unregisterSpecial(int keycode)
keycode
- keycode of the shortcutpublic void detectSpecialKeyPress(boolean enable)
enable
- enable or not the special key press detection.public boolean isSpecialKeyDetection()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.