Enum KeyCode

java.lang.Object
java.lang.Enum<KeyCode>
io.guise.framework.platform.web.KeyCode
All Implemented Interfaces:
Serializable, Comparable<KeyCode>

public enum KeyCode extends Enum<KeyCode>
A key on a keyboard as reported by a browser's Event.keyCode property.
Author:
Garret Wilson
  • Enum Constant Details

    • ALT

      public static final KeyCode ALT
      Key code definition.
    • BACKSPACE

      public static final KeyCode BACKSPACE
      Key code definition.
    • CONTROL

      public static final KeyCode CONTROL
      Key code definition.
    • DELETE

      public static final KeyCode DELETE
      Key code definition.
    • DOWN

      public static final KeyCode DOWN
      Key code definition.
    • END

      public static final KeyCode END
      Key code definition.
    • ENTER

      public static final KeyCode ENTER
      Key code definition.
    • ESCAPE

      public static final KeyCode ESCAPE
      Key code definition.
    • F1

      public static final KeyCode F1
      Key code definition.
    • F2

      public static final KeyCode F2
      Key code definition.
    • F3

      public static final KeyCode F3
      Key code definition.
    • F4

      public static final KeyCode F4
      Key code definition.
    • F5

      public static final KeyCode F5
      Key code definition.
    • F6

      public static final KeyCode F6
      Key code definition.
    • F7

      public static final KeyCode F7
      Key code definition.
    • F8

      public static final KeyCode F8
      Key code definition.
    • F9

      public static final KeyCode F9
      Key code definition.
    • F10

      public static final KeyCode F10
      Key code definition.
    • F11

      public static final KeyCode F11
      Key code definition.
    • F12

      public static final KeyCode F12
      Key code definition.
    • HOME

      public static final KeyCode HOME
      Key code definition.
    • LEFT

      public static final KeyCode LEFT
      Key code definition.
    • PAGE_UP

      public static final KeyCode PAGE_UP
      Key code definition.
    • PAGE_DOWN

      public static final KeyCode PAGE_DOWN
      Key code definition.
    • SHIFT

      public static final KeyCode SHIFT
      Key code definition.
    • TAB

      public static final KeyCode TAB
      Key code definition.
    • UP

      public static final KeyCode UP
      Key code definition.
  • Method Details

    • values

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

      public static KeyCode valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public int getCode()
      Returns:
      The code reported by the browser.
    • getKey

      public Key getKey()
      Returns:
      The key this key code represents.
    • valueOf

      public static KeyCode valueOf(int code)
      Retrieves a key code corresponding to the given code.
      Parameters:
      code - The code for which a key code should be returned.
      Returns:
      The key code representing the given code.
      Throws:
      IllegalArgumentException - if the given code does not match one of the known key codes.