Enum Class Key

java.lang.Object
java.lang.Enum<Key>
xyz.gmitch215.socketmc.util.input.Key
All Implemented Interfaces:
Serializable, Comparable<Key>, Constable

public enum Key extends Enum<Key>
Represents a key on a keyboard.
  • Enum Constant Details

    • SPACE

      public static final Key SPACE
      ' ' (space)
    • APOSTROPHE

      public static final Key APOSTROPHE
      '
    • COMMA

      public static final Key COMMA
      ,
    • MINUS

      public static final Key MINUS
      -
    • PERIOD

      public static final Key PERIOD
      .
    • SLASH

      public static final Key SLASH
      /
    • NUM_0

      public static final Key NUM_0
      0
    • NUM_1

      public static final Key NUM_1
      1
    • NUM_2

      public static final Key NUM_2
      2
    • NUM_3

      public static final Key NUM_3
      3
    • NUM_4

      public static final Key NUM_4
      4
    • NUM_5

      public static final Key NUM_5
      5
    • NUM_6

      public static final Key NUM_6
      6
    • NUM_7

      public static final Key NUM_7
      7
    • NUM_8

      public static final Key NUM_8
      8
    • NUM_9

      public static final Key NUM_9
      9
    • SEMICOLON

      public static final Key SEMICOLON
      ;
    • EQUAL

      public static final Key EQUAL
      =
    • A

      public static final Key A
      A
    • B

      public static final Key B
      B
    • C

      public static final Key C
      C
    • D

      public static final Key D
      D
    • E

      public static final Key E
      E
    • F

      public static final Key F
      F
    • G

      public static final Key G
      G
    • H

      public static final Key H
      H
    • I

      public static final Key I
      I
    • J

      public static final Key J
      J
    • K

      public static final Key K
      K
    • L

      public static final Key L
      L
    • M

      public static final Key M
      M
    • N

      public static final Key N
      N
    • O

      public static final Key O
      O
    • P

      public static final Key P
      P
    • Q

      public static final Key Q
      Q
    • R

      public static final Key R
      R
    • S

      public static final Key S
      S
    • T

      public static final Key T
      T
    • U

      public static final Key U
      U
    • V

      public static final Key V
      V
    • W

      public static final Key W
      W
    • X

      public static final Key X
      X
    • Y

      public static final Key Y
      Y
    • Z

      public static final Key Z
      Z
    • LEFT_BRACKET

      public static final Key LEFT_BRACKET
      [
    • BACKSLASH

      public static final Key BACKSLASH
      \
    • RIGHT_BRACKET

      public static final Key RIGHT_BRACKET
      ]
    • GRAVE_ACCENT

      public static final Key GRAVE_ACCENT
      `
    • WORLD_1

      public static final Key WORLD_1
      World 1 (non-US #1)
    • WORLD_2

      public static final Key WORLD_2
      World 2 (non-US #2)
    • ESCAPE

      public static final Key ESCAPE
      Escape Button
    • ENTER

      public static final Key ENTER
      Enter Button
    • TAB

      public static final Key TAB
      Tab Button
    • BACKSPACE

      public static final Key BACKSPACE
      Backspace Button
    • INSERT

      public static final Key INSERT
      Insert Button
    • DELETE

      public static final Key DELETE
      Delete Button
    • LEFT

      public static final Key LEFT
      Left Arrow Button
    • DOWN

      public static final Key DOWN
      Down Arrow Button
    • UP

      public static final Key UP
      Up Arrow Button
    • PAGE_UP

      public static final Key PAGE_UP
      Page Up Button
    • PAGE_DOWN

      public static final Key PAGE_DOWN
      Page Down Button
    • HOME

      public static final Key HOME
      Home Button
    • END

      public static final Key END
      End Button
    • CAPS_LOCK

      public static final Key CAPS_LOCK
      Caps Lock Button
    • SCROLL_LOCK

      public static final Key SCROLL_LOCK
      Scroll Lock Button
    • NUM_LOCK

      public static final Key NUM_LOCK
      Num Lock Button
    • PAUSE

      public static final Key PAUSE
      Pause Button
    • F1

      public static final Key F1
      F1
    • F2

      public static final Key F2
      F2
    • F3

      public static final Key F3
      F3
    • F4

      public static final Key F4
      F4
    • F5

      public static final Key F5
      F5
    • F6

      public static final Key F6
      F6
    • F7

      public static final Key F7
      F7
    • F8

      public static final Key F8
      F8
    • F9

      public static final Key F9
      F9
    • F10

      public static final Key F10
      F10
    • F11

      public static final Key F11
      F11
    • F12

      public static final Key F12
      F12
    • F13

      public static final Key F13
      F13
    • F14

      public static final Key F14
      F14
    • F15

      public static final Key F15
      F15
    • F16

      public static final Key F16
      F16
    • F17

      public static final Key F17
      F17
    • F18

      public static final Key F18
      F18
    • F19

      public static final Key F19
      F19
    • F20

      public static final Key F20
      F20
    • F21

      public static final Key F21
      F21
    • F22

      public static final Key F22
      F22
    • F23

      public static final Key F23
      F23
    • F24

      public static final Key F24
      F24
    • F25

      public static final Key F25
      F25
    • KP_0

      public static final Key KP_0
      0 (Keypad)
    • KP_1

      public static final Key KP_1
      1 (Keypad)
    • KP_2

      public static final Key KP_2
      2 (Keypad)
    • KP_3

      public static final Key KP_3
      3 (Keypad)
    • KP_4

      public static final Key KP_4
      4 (Keypad)
    • KP_5

      public static final Key KP_5
      5 (Keypad)
    • KP_6

      public static final Key KP_6
      6 (Keypad)
    • KP_7

      public static final Key KP_7
      7 (Keypad)
    • KP_8

      public static final Key KP_8
      8 (Keypad)
    • KP_9

      public static final Key KP_9
      9 (Keypad)
    • KP_DECIMAL

      public static final Key KP_DECIMAL
      . (Keypad)
    • KP_DIVIDE

      public static final Key KP_DIVIDE
      / (Keypad)
    • KP_MULTIPLY

      public static final Key KP_MULTIPLY
      * (Keypad)
    • KP_SUBTRACT

      public static final Key KP_SUBTRACT
      - (Keypad)
    • KP_ADD

      public static final Key KP_ADD
      + (Keypad)
    • KP_ENTER

      public static final Key KP_ENTER
      Enter Button (Keypad)
    • KP_EQUAL

      public static final Key KP_EQUAL
      = (Keypad)
    • LEFT_SHIFT

      public static final Key LEFT_SHIFT
      Left Shift Button
    • LEFT_CONTROL

      public static final Key LEFT_CONTROL
      Left Control Button
    • LEFT_ALT

      public static final Key LEFT_ALT
      Left Alt Button
    • LEFT_SUPER

      public static final Key LEFT_SUPER
      Left Super Button
    • RIGHT_SHIFT

      public static final Key RIGHT_SHIFT
      Right Shift Button
    • RIGHT_CONTROL

      public static final Key RIGHT_CONTROL
      Right Control Button
    • RIGHT_ALT

      public static final Key RIGHT_ALT
      Right Alt Button
    • RIGHT_SUPER

      public static final Key RIGHT_SUPER
      Right Super Button
  • Method Details

    • values

      public static Key[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Key valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      Gets the keyboard code of this key, as specified by GLFW.
      Returns:
      the keyboard code
    • fromCode

      @Nullable public static @Nullable Key fromCode(int code)
      Gets the key from the keyboard code.
      Parameters:
      code - the keyboard code
      Returns:
      the key or null if not found
      See Also: