public class LLKeyboardHook extends AbstractHook
Usage:
1) define a class that implements interface LLKeyboardHookListener
2) to intercept keyboard events in the class, implement: public void onLLKeyboardHook(int nCode, NativeLong wParam, KBDLLHOOKSTRUCT info)
3) use LLKeyboardHook in the class
org.safs.natives.test.hookTest
Modifier and Type | Field and Description |
---|---|
static int |
WH_KEYBOARD_LL
the type of hook for a hook procedure that monitors low-level keyboard events
|
hhk, hookId, hookname, hookProc, isHooked, listeners, USER32INST, WM_CHAR, WM_KEYDOWN, WM_KEYUP, WM_KILLFOCUS, WM_LBUTTONDBLCLK, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEHOVER, WM_MOUSEMOVE, WM_RBUTTONDOWN, WM_RBUTTONUP, WM_SETFOCUS, WM_SYSKEYDOWN, WM_SYSKEYUP, WM_UNICHAR
Constructor and Description |
---|
LLKeyboardHook() |
Modifier and Type | Method and Description |
---|---|
boolean |
addListener(CallbackHookListener listener)
add a listener for current Hook, it should be overridden in its derived classes for setting a specific listener.
|
getHook, isHooked, removeListener, run, setHook, stop
public static final int WH_KEYBOARD_LL
public boolean addListener(CallbackHookListener listener)
AbstractHook
addListener
in class AbstractHook
listener
- -- a CallbackHookListenerCopyright © SAS Institute. All Rights Reserved.