Interface KeyModifiers


public interface KeyModifiers
The modifiers for the keyboard and mouse events. Indicates which keyboard modifier keys are pressed.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder of KeyModifiers.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if the Alt key is pressed.
    default boolean
    Returns true if the Alt Graph/Right Alt key is pressed.
    default boolean
    Returns true if the Ctrl key is pressed.
    default boolean
    Returns true if the Meta key is pressed.
    default boolean
    Returns true if the Shift key is pressed.
    Creates a new KeyModifiers builder.
  • Method Details

    • newBuilder

      static KeyModifiers.Builder newBuilder()
      Creates a new KeyModifiers builder.
      Returns:
      a new KeyModifiers.Builder instance
    • isAltDown

      default boolean isAltDown()
      Returns true if the Alt key is pressed.
    • isAltGraphDown

      default boolean isAltGraphDown()
      Returns true if the Alt Graph/Right Alt key is pressed.
    • isShiftDown

      default boolean isShiftDown()
      Returns true if the Shift key is pressed.
    • isControlDown

      default boolean isControlDown()
      Returns true if the Ctrl key is pressed.
    • isMetaDown

      default boolean isMetaDown()
      Returns true if the Meta key is pressed.