Enum KeyEvent.Modifier

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<KeyEvent.Modifier>
    Enclosing class:
    KeyEvent

    public static enum KeyEvent.Modifier
    extends java.lang.Enum<KeyEvent.Modifier>
    Defines modifier keys that can be held during a key event.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Alt
      The Alt key was held.
      CapsLock
      The Caps Lock key was active.
      Control
      The Control key was held.
      Hyper
      The Hyper key was held.
      Meta
      The Meta key was held.
      NumLock
      The Num Lock key was active.
      Shift
      The Shift key was held.
      Super
      The Super (Windows/Command) key was held.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static KeyEvent.Modifier valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static KeyEvent.Modifier[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • Super

        public static final KeyEvent.Modifier Super
        The Super (Windows/Command) key was held. Reported by the Kitty Keyboard Protocol.
      • Hyper

        public static final KeyEvent.Modifier Hyper
        The Hyper key was held. Reported by the Kitty Keyboard Protocol.
      • Meta

        public static final KeyEvent.Modifier Meta
        The Meta key was held. Reported by the Kitty Keyboard Protocol.
      • CapsLock

        public static final KeyEvent.Modifier CapsLock
        The Caps Lock key was active. Reported by the Kitty Keyboard Protocol.
      • NumLock

        public static final KeyEvent.Modifier NumLock
        The Num Lock key was active. Reported by the Kitty Keyboard Protocol.
    • Method Detail

      • values

        public static KeyEvent.Modifier[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (KeyEvent.Modifier c : KeyEvent.Modifier.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static KeyEvent.Modifier valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null