Interface NativeKeyListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
NativeHookDemo, NativeKeyAdapter, SwingKeyAdapter

public interface NativeKeyListener extends EventListener
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 Details

    • nativeKeyTyped

      default void nativeKeyTyped(NativeKeyEvent nativeEvent)
      Invoked when a key has been typed.
      Parameters:
      nativeEvent - the native key event.
      Since:
      1.1
    • nativeKeyPressed

      default void nativeKeyPressed(NativeKeyEvent nativeEvent)
      Invoked when a key has been pressed.
      Parameters:
      nativeEvent - the native key event.
    • nativeKeyReleased

      default void nativeKeyReleased(NativeKeyEvent nativeEvent)
      Invoked when a key has been released.
      Parameters:
      nativeEvent - the native key event.