Package io.guise.framework.platform.web
Enum KeyCode
- All Implemented Interfaces:
Serializable
,Comparable<KeyCode>
A key on a keyboard as reported by a browser's Event.keyCode property.
- Author:
- Garret Wilson
-
Enum Constant Summary
Enum ConstantDescriptionKey code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition.Key code definition. -
Method Summary
Modifier and TypeMethodDescriptionint
getCode()
getKey()
static KeyCode
valueOf
(int code) Retrieves a key code corresponding to the given code.static KeyCode
Returns the enum constant of this type with the specified name.static KeyCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALT
Key code definition. -
BACKSPACE
Key code definition. -
CONTROL
Key code definition. -
DELETE
Key code definition. -
DOWN
Key code definition. -
END
Key code definition. -
ENTER
Key code definition. -
ESCAPE
Key code definition. -
F1
Key code definition. -
F2
Key code definition. -
F3
Key code definition. -
F4
Key code definition. -
F5
Key code definition. -
F6
Key code definition. -
F7
Key code definition. -
F8
Key code definition. -
F9
Key code definition. -
F10
Key code definition. -
F11
Key code definition. -
F12
Key code definition. -
HOME
Key code definition. -
LEFT
Key code definition. -
PAGE_UP
Key code definition. -
PAGE_DOWN
Key code definition. -
RIGHT
Key code definition. -
SHIFT
Key code definition. -
TAB
Key code definition. -
UP
Key code definition.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getCode
public int getCode()- Returns:
- The code reported by the browser.
-
getKey
- Returns:
- The key this key code represents.
-
valueOf
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.
-