KeyCode
Physical keyboard key mapping for VitaLite keyboard dispatch.
EnumRLPlugins API
public enum KeyCodeValues
DIGIT_0, DIGIT_1, DIGIT_2, DIGIT_3, DIGIT_4, DIGIT_5, DIGIT_6, DIGIT_7, DIGIT_8, DIGIT_9, SPACE, ENTER, BACKSPACE, SHIFT, CTRL, TAB, ESCAPE, F10, F11, F12, MINUS, EQUALS, OPEN_BRACKET, CLOSE_BRACKET, BACK_SLASH, SEMICOLON, QUOTE, COMMA, PERIOD, SLASH, BACK_QUOTE
Members
Methods
- intawtKeyCode()
Gets the AWT physical key code.
- KeyCodeforChar(char)
Resolves a printable character to its physical key.
- KeyCodefunctionKey(int)
Resolves a one-based function-key index to F1-F12.
- booleanrequiresShift(char)
Checks whether typing a character requires Shift.
- booleanrequiresTypedEvent()
Checks whether this key can emit a KEY_TYPED event by itself.
- chartypedCharFor(char)
Resolves the typed-event character for an intended input character.
awtKeyCode()
public int awtKeyCode()Gets the AWT physical key code.
Returns
AWT key code.
forChar(char)static
public static KeyCode forChar(char character)Resolves a printable character to its physical key.
Parameters
character- Character to type.
Returns
Matching physical key.
functionKey(int)static
public static KeyCode functionKey(int keyIndex)Resolves a one-based function-key index to F1-F12.
Parameters
keyIndex- One-based key index.
Returns
Function key, or null when outside F1-F12.
requiresShift(char)static
public static boolean requiresShift(char character)Checks whether typing a character requires Shift.
Parameters
character- Character to type.
Returns
True when Shift is required.
requiresTypedEvent()
public boolean requiresTypedEvent()Checks whether this key can emit a KEY_TYPED event by itself.
Returns
True when this key has a printable typed character.
typedCharFor(char)static
public static char typedCharFor(char character)Resolves the typed-event character for an intended input character.
Parameters
character- Character to type.
Returns
Character to put in the KEY_TYPED event.
Also allowed
Every enum has these, as in plain Java.
compareTo, equals, hashCode, name, ordinal, toString, valueOf, values