Module com.github.kwhat.jnativehook
Interface NativeKeyListener
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
NativeHookDemo,NativeKeyAdapter,SwingKeyAdapter
The listener interface for receiving global
NativeKeyEvents.
The class that is interested in processing a NativeKeyEvent implements this
interface, and the object created with that class is registered with the
GlobalScreen using the GlobalScreen.addNativeKeyListener(NativeKeyListener)
method. When the
NativeKeyEvent occurs, that object's appropriate method is
invoked.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Alexander Barker (alex@1stleg.com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidnativeKeyPressed(NativeKeyEvent nativeEvent) Invoked when a key has been pressed.default voidnativeKeyReleased(NativeKeyEvent nativeEvent) Invoked when a key has been released.default voidnativeKeyTyped(NativeKeyEvent nativeEvent) Invoked when a key has been typed.
-
Method Details
-
nativeKeyTyped
Invoked when a key has been typed.- Parameters:
nativeEvent- the native key event.- Since:
- 1.1
-
nativeKeyPressed
Invoked when a key has been pressed.- Parameters:
nativeEvent- the native key event.
-
nativeKeyReleased
Invoked when a key has been released.- Parameters:
nativeEvent- the native key event.
-