Class KeyEvent

All Implemented Interfaces:
PointerInterface

public class KeyEvent extends Event
An event related to a key-based device.

https://docs.gtk.org/gdk4/class.KeyEvent.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getConsumedModifiers

      public int getConsumedModifiers()
      Extracts the consumed modifiers from a key event.
      Returns:
      the consumed modifiers or @event
    • getKeycode

      public int getKeycode()
      Extracts the keycode from a key event.
      Returns:
      the keycode of @event
    • getKeyval

      public int getKeyval()
      Extracts the keyval from a key event.
      Returns:
      the keyval of @event
    • getLayout

      public int getLayout()
      Extracts the layout from a key event.
      Returns:
      the layout of @event
    • getLevel

      public int getLevel()
      Extracts the shift level from a key event.
      Returns:
      the shift level of @event
    • isModifier

      public boolean isModifier()
      Extracts whether the key event is for a modifier key.
      Returns:
      %TRUE if the @event is for a modifier key
    • matches

      public int matches(int keyval, int modifiers)
      Matches a key event against a keyval and modifiers.

      This is typically used to trigger keyboard shortcuts such as Ctrl-C.

      Partial matches are possible where the combination matches
      if the currently active group is ignored.

      Note that we ignore Caps Lock for matching.
      Parameters:
      keyval - the keyval to match
      modifiers - the modifiers to match
      Returns:
      a `GdkKeyMatch` value describing whether @event matches
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()