Enum Key

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Key>

    public enum Key
    extends java.lang.Enum<Key>
    The constants of this enumerated type represent keys on the keyboard.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      A
      Constant for the A key
      ADD
      Constant for the Add key
      ALT
      Constant for the Alt key (Option on the Mac keyboard)
      B
      Constant for the B key
      BACK_SPACE
      Constant for the Backspace key
      C
      Constant for the C key
      CAPS
      Constant for the Caps Lock key
      COMMA
      Constant for the Comma key
      COMMAND
      Constant for the Command key on the Mac keyboard
      CONTEXT_MENU
      Constant for the Context Menu key
      CONTROL
      Constant for the Ctrl key (Control on the Mac keyboard)
      D
      Constant for the D key
      DELETE
      Constant for the Delete key
      DIGIT0
      Constant for the 0 key
      DIGIT1
      Constant for the 1 key
      DIGIT2
      Constant for the 2 key
      DIGIT3
      Constant for the 3 key
      DIGIT4
      Constant for the 4 key
      DIGIT5
      Constant for the 5 key
      DIGIT6
      Constant for the 6 key
      DIGIT7
      Constant for the 7 key
      DIGIT8
      Constant for the 8 key
      DIGIT9
      Constant for the 9 key
      DIVIDE
      Constant for the Divide key
      DOWN
      Constant for the Down (arrow) key
      E
      Constant for the E key
      END
      Constant for the End key
      ENTER
      Constant for the Enter key
      ESCAPE
      Constant for the Escape key
      F
      Constant for the F key
      F1
      Constant for the F1 key
      F10
      Constant for the F10 key
      F11
      Constant for the F11 key
      F12
      Constant for the F12 key
      F2
      Constant for the F2 key
      F3
      Constant for the F3 key
      F4
      Constant for the F4 key
      F5
      Constant for the F5 key
      F6
      Constant for the F6 key
      F7
      Constant for the F7 key
      F8
      Constant for the F8 key
      F9
      Constant for the F9 key
      G
      Constant for the G key
      H
      Constant for the H key
      HOME
      Constant for the Home key
      I
      Constant for the I key
      INSERT
      Constant for the Insert key
      J
      Constant for the J key
      K
      Constant for the K key
      KP_DOWN
      Constant for the Down (arrow) key on the numeric keypad
      KP_LEFT
      Constant for the Left (arrow) key on the numeric keypad
      KP_RIGHT
      Constant for the Right (arrow) key on the numeric keypad
      KP_UP
      Constant for the Up (arrow) key on the numeric keypad
      L
      Constant for the L key
      LEFT
      Constant for the Left (arrow) key
      M
      Constant for the M key
      META
      Constant for the Meta key
      MINUS
      Constant for the Minus key
      MULTIPLY
      Constant for the Multiply key
      MUTE
      Constant for the Mute key
      N
      Constant for the N key
      NUMPAD0
      Constant for the 0 key on the numeric keypad
      NUMPAD1
      Constant for the 1 key on the numeric keypad
      NUMPAD2
      Constant for the 2 key on the numeric keypad
      NUMPAD3
      Constant for the 3 key on the numeric keypad
      NUMPAD4
      Constant for the 4 key on the numeric keypad
      NUMPAD5
      Constant for the 5 key on the numeric keypad
      NUMPAD6
      Constant for the 6 key on the numeric keypad
      NUMPAD7
      Constant for the 7 key on the numeric keypad
      NUMPAD8
      Constant for the 8 key on the numeric keypad
      NUMPAD9
      Constant for the 9 key on the numeric keypad
      O
      Constant for the O key
      P
      Constant for the P key
      PAGE_DOWN
      Constant for the PageDown key
      PAGE_UP
      Constant for the PageUp key
      PERIOD
      Constant for the Period key
      Q
      Constant for the Q key
      R
      Constant for the R key
      RIGHT
      Constant for the Right (arrow) key
      S
      Constant for the S key
      SHIFT
      Constant for the Shift key
      SPACE
      Constant for the Space key
      SUBTRACT
      Constant for the Subtract key
      T
      Constant for the T key
      TAB
      Constant for the Tab key
      U
      Constant for the U key
      UNDEFINED
      Constant for unknown keys
      UP
      Constant for the Up (arrow) key
      V
      Constant for the V key
      VOLUME_DOWN
      Constant for the Volume Down key
      VOLUME_UP
      Constant for the Volume Up key
      W
      Constant for the W key
      WINDOWS
      Constant for the Windows key
      X
      Constant for the X key
      Y
      Constant for the Y key
      Z
      Constant for the Z key
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Key valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Key[] 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

      • ENTER

        public static final Key ENTER
        Constant for the Enter key
      • BACK_SPACE

        public static final Key BACK_SPACE
        Constant for the Backspace key
      • TAB

        public static final Key TAB
        Constant for the Tab key
      • SHIFT

        public static final Key SHIFT
        Constant for the Shift key
      • CONTROL

        public static final Key CONTROL
        Constant for the Ctrl key (Control on the Mac keyboard)
      • ALT

        public static final Key ALT
        Constant for the Alt key (Option on the Mac keyboard)
      • CAPS

        public static final Key CAPS
        Constant for the Caps Lock key
      • ESCAPE

        public static final Key ESCAPE
        Constant for the Escape key
      • SPACE

        public static final Key SPACE
        Constant for the Space key
      • PAGE_UP

        public static final Key PAGE_UP
        Constant for the PageUp key
      • PAGE_DOWN

        public static final Key PAGE_DOWN
        Constant for the PageDown key
      • END

        public static final Key END
        Constant for the End key
      • HOME

        public static final Key HOME
        Constant for the Home key
      • LEFT

        public static final Key LEFT
        Constant for the Left (arrow) key
      • UP

        public static final Key UP
        Constant for the Up (arrow) key
      • RIGHT

        public static final Key RIGHT
        Constant for the Right (arrow) key
      • DOWN

        public static final Key DOWN
        Constant for the Down (arrow) key
      • COMMA

        public static final Key COMMA
        Constant for the Comma key
      • MINUS

        public static final Key MINUS
        Constant for the Minus key
      • PERIOD

        public static final Key PERIOD
        Constant for the Period key
      • DIGIT0

        public static final Key DIGIT0
        Constant for the 0 key
      • DIGIT1

        public static final Key DIGIT1
        Constant for the 1 key
      • DIGIT2

        public static final Key DIGIT2
        Constant for the 2 key
      • DIGIT3

        public static final Key DIGIT3
        Constant for the 3 key
      • DIGIT4

        public static final Key DIGIT4
        Constant for the 4 key
      • DIGIT5

        public static final Key DIGIT5
        Constant for the 5 key
      • DIGIT6

        public static final Key DIGIT6
        Constant for the 6 key
      • DIGIT7

        public static final Key DIGIT7
        Constant for the 7 key
      • DIGIT8

        public static final Key DIGIT8
        Constant for the 8 key
      • DIGIT9

        public static final Key DIGIT9
        Constant for the 9 key
      • A

        public static final Key A
        Constant for the A key
      • B

        public static final Key B
        Constant for the B key
      • C

        public static final Key C
        Constant for the C key
      • D

        public static final Key D
        Constant for the D key
      • E

        public static final Key E
        Constant for the E key
      • F

        public static final Key F
        Constant for the F key
      • G

        public static final Key G
        Constant for the G key
      • H

        public static final Key H
        Constant for the H key
      • I

        public static final Key I
        Constant for the I key
      • J

        public static final Key J
        Constant for the J key
      • K

        public static final Key K
        Constant for the K key
      • L

        public static final Key L
        Constant for the L key
      • M

        public static final Key M
        Constant for the M key
      • N

        public static final Key N
        Constant for the N key
      • O

        public static final Key O
        Constant for the O key
      • P

        public static final Key P
        Constant for the P key
      • Q

        public static final Key Q
        Constant for the Q key
      • R

        public static final Key R
        Constant for the R key
      • S

        public static final Key S
        Constant for the S key
      • T

        public static final Key T
        Constant for the T key
      • U

        public static final Key U
        Constant for the U key
      • V

        public static final Key V
        Constant for the V key
      • W

        public static final Key W
        Constant for the W key
      • X

        public static final Key X
        Constant for the X key
      • Y

        public static final Key Y
        Constant for the Y key
      • Z

        public static final Key Z
        Constant for the Z key
      • NUMPAD0

        public static final Key NUMPAD0
        Constant for the 0 key on the numeric keypad
      • NUMPAD1

        public static final Key NUMPAD1
        Constant for the 1 key on the numeric keypad
      • NUMPAD2

        public static final Key NUMPAD2
        Constant for the 2 key on the numeric keypad
      • NUMPAD3

        public static final Key NUMPAD3
        Constant for the 3 key on the numeric keypad
      • NUMPAD4

        public static final Key NUMPAD4
        Constant for the 4 key on the numeric keypad
      • NUMPAD5

        public static final Key NUMPAD5
        Constant for the 5 key on the numeric keypad
      • NUMPAD6

        public static final Key NUMPAD6
        Constant for the 6 key on the numeric keypad
      • NUMPAD7

        public static final Key NUMPAD7
        Constant for the 7 key on the numeric keypad
      • NUMPAD8

        public static final Key NUMPAD8
        Constant for the 8 key on the numeric keypad
      • NUMPAD9

        public static final Key NUMPAD9
        Constant for the 9 key on the numeric keypad
      • MULTIPLY

        public static final Key MULTIPLY
        Constant for the Multiply key
      • ADD

        public static final Key ADD
        Constant for the Add key
      • SUBTRACT

        public static final Key SUBTRACT
        Constant for the Subtract key
      • DIVIDE

        public static final Key DIVIDE
        Constant for the Divide key
      • DELETE

        public static final Key DELETE
        Constant for the Delete key
      • F1

        public static final Key F1
        Constant for the F1 key
      • F2

        public static final Key F2
        Constant for the F2 key
      • F3

        public static final Key F3
        Constant for the F3 key
      • F4

        public static final Key F4
        Constant for the F4 key
      • F5

        public static final Key F5
        Constant for the F5 key
      • F6

        public static final Key F6
        Constant for the F6 key
      • F7

        public static final Key F7
        Constant for the F7 key
      • F8

        public static final Key F8
        Constant for the F8 key
      • F9

        public static final Key F9
        Constant for the F9 key
      • F10

        public static final Key F10
        Constant for the F10 key
      • F11

        public static final Key F11
        Constant for the F11 key
      • F12

        public static final Key F12
        Constant for the F12 key
      • INSERT

        public static final Key INSERT
        Constant for the Insert key
      • META

        public static final Key META
        Constant for the Meta key
      • KP_UP

        public static final Key KP_UP
        Constant for the Up (arrow) key on the numeric keypad
      • KP_DOWN

        public static final Key KP_DOWN
        Constant for the Down (arrow) key on the numeric keypad
      • KP_LEFT

        public static final Key KP_LEFT
        Constant for the Left (arrow) key on the numeric keypad
      • KP_RIGHT

        public static final Key KP_RIGHT
        Constant for the Right (arrow) key on the numeric keypad
      • WINDOWS

        public static final Key WINDOWS
        Constant for the Windows key
      • CONTEXT_MENU

        public static final Key CONTEXT_MENU
        Constant for the Context Menu key
      • UNDEFINED

        public static final Key UNDEFINED
        Constant for unknown keys
      • VOLUME_UP

        public static final Key VOLUME_UP
        Constant for the Volume Up key
      • VOLUME_DOWN

        public static final Key VOLUME_DOWN
        Constant for the Volume Down key
      • MUTE

        public static final Key MUTE
        Constant for the Mute key
      • COMMAND

        public static final Key COMMAND
        Constant for the Command key on the Mac keyboard
    • Method Detail

      • values

        public static Key[] 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 (Key c : Key.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Key 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