KeyEvent objects.
For a given keyboard layout each key is assigned a code which does not vary
and is not affected by the state of the modifier keys. For keys that
generate printable characters the code will usually be based on the
character generated when no modifier key is held down. The exceptions are
KeyCode#A through KeyCode#Z which are assigned to keys
even on layouts which don't generate those letters (such as Greek). This
ensures that common letter-based shortcuts are accessible on all layouts.
Keys that generate characters with accents or other diacritic marks are
usually assigned a code of KeyCode#UNDEFINED.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final KeyCode | A
Constant for the |
| public static final KeyCode | ACCEPT
Constant for the Accept or Commit function key. |
| public static final KeyCode | ADD
Constant for the |
| public static final KeyCode | AGAIN
Constant for the |
| public static final KeyCode | ALL_CANDIDATES
Constant for the All Candidates function key. |
| public static final KeyCode | ALPHANUMERIC
Constant for the Alphanumeric function key. |
| public static final KeyCode | ALT
Constant for the |
| public static final KeyCode | ALT_GRAPH
Constant for the AltGraph function key. |
| public static final KeyCode | AMPERSAND
Constant for the |
| public static final KeyCode | ASTERISK
Constant for the |
| public static final KeyCode | AT
Constant for the "@" key. |
| public static final KeyCode | B
Constant for the |
| public static final KeyCode | BACK_QUOTE
Constant for the |
| public static final KeyCode | BACK_SLASH
Constant for the back slash key, "\" |
| public static final KeyCode | BACK_SPACE
Constant for the |
| public static final KeyCode | BEGIN
Constant for the Begin key. |
| public static final KeyCode | BRACELEFT
Constant for the |
| public static final KeyCode | BRACERIGHT
Constant for the |
| public static final KeyCode | C
Constant for the |
| public static final KeyCode | CANCEL
Constant for the |
| public static final KeyCode | CAPS
Constant for the |
| pack-priv final String | |
| public static final KeyCode | CHANNEL_DOWN
Constant for the |
| public static final KeyCode | CHANNEL_UP
Constant for the |
| public static final KeyCode | CIRCUMFLEX
Constant for the "^" key. |
| public static final KeyCode | CLEAR
Constant for the |
| public static final KeyCode | CLOSE_BRACKET
Constant for the close bracket key, "]" |
| pack-priv final int | |
| public static final KeyCode | CODE_INPUT
Constant for the Code Input function key. |
| public static final KeyCode | COLON
Constant for the ":" key. |
| public static final KeyCode | COLORED_KEY_0
Constant for the |
| public static final KeyCode | COLORED_KEY_1
Constant for the |
| public static final KeyCode | COLORED_KEY_2
Constant for the |
| public static final KeyCode | COLORED_KEY_3
Constant for the |
| public static final KeyCode | COMMA
Constant for the comma key, "," |
| public static final KeyCode | COMMAND
Constant for the Apple |
| public static final KeyCode | COMPOSE
Constant for the input method on/off key. |
| public static final KeyCode | CONTEXT_MENU
Constant for the Microsoft Windows Context Menu key. |
| public static final KeyCode | CONTROL
Constant for the |
| public static final KeyCode | CONVERT
Constant for the Convert function key. |
| public static final KeyCode | COPY
Constant for the |
| public static final KeyCode | CUT
Constant for the |
| public static final KeyCode | D
Constant for the |
| public static final KeyCode | DEAD_ABOVEDOT
Constant for the |
| public static final KeyCode | DEAD_ABOVERING
Constant for the |
| public static final KeyCode | DEAD_ACUTE
Constant for the |
| public static final KeyCode | DEAD_BREVE
Constant for the |
| public static final KeyCode | DEAD_CARON
Constant for the |
| public static final KeyCode | DEAD_CEDILLA
Constant for the |
| public static final KeyCode | DEAD_CIRCUMFLEX
Constant for the |
| public static final KeyCode | DEAD_DIAERESIS
Constant for the |
| public static final KeyCode | DEAD_DOUBLEACUTE
Constant for the |
| public static final KeyCode | DEAD_GRAVE
Constant for the |
| public static final KeyCode | DEAD_IOTA
Constant for the |
| public static final KeyCode | DEAD_MACRON
Constant for the |
| public static final KeyCode | DEAD_OGONEK
Constant for the |
| public static final KeyCode | DEAD_SEMIVOICED_SOUND
Constant for the |
| public static final KeyCode | DEAD_TILDE
Constant for the |
| public static final KeyCode | DEAD_VOICED_SOUND
Constant for the |
| public static final KeyCode | DECIMAL
Constant for the |
| public static final KeyCode | DELETE
Constant for the |
| public static final KeyCode | DIGIT0
Constant for the |
| public static final KeyCode | DIGIT1
Constant for the |
| public static final KeyCode | DIGIT2
Constant for the |
| public static final KeyCode | DIGIT3
Constant for the |
| public static final KeyCode | DIGIT4
Constant for the |
| public static final KeyCode | DIGIT5
Constant for the |
| public static final KeyCode | DIGIT6
Constant for the |
| public static final KeyCode | DIGIT7
Constant for the |
| public static final KeyCode | DIGIT8
Constant for the |
| public static final KeyCode | DIGIT9
Constant for the |
| public static final KeyCode | DIVIDE
Constant for the |
| public static final KeyCode | DOLLAR
Constant for the "$" key. |
| public static final KeyCode | DOWN
Constant for the non-numpad down arrow key. |
| public static final KeyCode | E
Constant for the |
| public static final KeyCode | EJECT_TOGGLE
Constant for the |
| public static final KeyCode | END
Constant for the |
| public static final KeyCode | ENTER
Constant for the |
| public static final KeyCode | EQUALS
Constant for the equals key, "=" |
| public static final KeyCode | ESCAPE
Constant for the |
| public static final KeyCode | EURO_SIGN
Constant for the Euro currency sign key. |
| public static final KeyCode | EXCLAMATION_MARK
Constant for the "!" key. |
| public static final KeyCode | F
Constant for the |
| public static final KeyCode | F1
Constant for the F1 function key. |
| public static final KeyCode | F10
Constant for the F10 function key. |
| public static final KeyCode | F11
Constant for the F11 function key. |
| public static final KeyCode | F12
Constant for the F12 function key. |
| public static final KeyCode | F13
Constant for the F13 function key. |
| public static final KeyCode | F14
Constant for the F14 function key. |
| public static final KeyCode | F15
Constant for the F15 function key. |
| public static final KeyCode | F16
Constant for the F16 function key. |
| public static final KeyCode | F17
Constant for the F17 function key. |
| public static final KeyCode | F18
Constant for the F18 function key. |
| public static final KeyCode | F19
Constant for the F19 function key. |
| public static final KeyCode | F2
Constant for the F2 function key. |
| public static final KeyCode | F20
Constant for the F20 function key. |
| public static final KeyCode | F21
Constant for the F21 function key. |
| public static final KeyCode | F22
Constant for the F22 function key. |
| public static final KeyCode | F23
Constant for the F23 function key. |
| public static final KeyCode | F24
Constant for the F24 function key. |
| public static final KeyCode | F3
Constant for the F3 function key. |
| public static final KeyCode | F4
Constant for the F4 function key. |
| public static final KeyCode | F5
Constant for the F5 function key. |
| public static final KeyCode | F6
Constant for the F6 function key. |
| public static final KeyCode | F7
Constant for the F7 function key. |
| public static final KeyCode | F8
Constant for the F8 function key. |
| public static final KeyCode | F9
Constant for the F9 function key. |
| public static final KeyCode | FAST_FWD
Constant for the |
| public static final KeyCode | FINAL
Constant for input method support on Asian Keyboards. |
| public static final KeyCode | FIND
Constant for the |
| public static final KeyCode | FULL_WIDTH
Constant for the Full-Width Characters function key. |
| public static final KeyCode | G
Constant for the |
| public static final KeyCode | GAME_A
Constant for the |
| public static final KeyCode | GAME_B
Constant for the |
| public static final KeyCode | GAME_C
Constant for the |
| public static final KeyCode | GAME_D
Constant for the |
| public static final KeyCode | GREATER
Constant for the |
| public static final KeyCode | H
Constant for the |
| public static final KeyCode | HALF_WIDTH
Constant for the Half-Width Characters function key. |
| public static final KeyCode | HELP
Constant for the |
| public static final KeyCode | HIRAGANA
Constant for the Hiragana function key. |
| public static final KeyCode | HOME
Constant for the |
| public static final KeyCode | I
Constant for the |
| public static final KeyCode | INFO
Constant for the |
| public static final KeyCode | INPUT_METHOD_ON_OFF
Constant for the input method on/off key. |
| public static final KeyCode | INSERT
Constant for the |
| public static final KeyCode | INVERTED_EXCLAMATION_MARK
Constant for the inverted exclamation mark key. |
| public static final KeyCode | J
Constant for the |
| public static final KeyCode | JAPANESE_HIRAGANA
Constant for the Japanese-Hiragana function key. |
| public static final KeyCode | JAPANESE_KATAKANA
Constant for the Japanese-Katakana function key. |
| public static final KeyCode | JAPANESE_ROMAN
Constant for the Japanese-Roman function key. |
| public static final KeyCode | K
Constant for the |
| public static final KeyCode | KANA
Constant for the |
| public static final KeyCode | KANA_LOCK
Constant for the locking Kana function key. |
| public static final KeyCode | KANJI
Constant for the |
| public static final KeyCode | KATAKANA
Constant for the Katakana function key. |
| public static final KeyCode | KP_DOWN
Constant for the numeric keypad down arrow key. |
| public static final KeyCode | KP_LEFT
Constant for the numeric keypad left arrow key. |
| public static final KeyCode | KP_RIGHT
Constant for the numeric keypad right arrow key. |
| public static final KeyCode | KP_UP
Constant for the numeric keypad up arrow key. |
| public static final KeyCode | L
Constant for the |
| public static final KeyCode | LEFT
Constant for the non-numpad left arrow key. |
| public static final KeyCode | LEFT_PARENTHESIS
Constant for the "(" key. |
| public static final KeyCode | LESS
Constant for the |
| public static final KeyCode | M
Constant for the |
| private int | |
| public static final KeyCode | META
Constant for the |
| public static final KeyCode | MINUS
Constant for the minus key, "-" |
| public static final KeyCode | MODECHANGE
Constant for the |
| public static final KeyCode | MULTIPLY
Constant for the |
| public static final KeyCode | MUTE
Constant for the |
| public static final KeyCode | N
Constant for the |
| pack-priv final String | name
Hides java. |
| private static final Map | |
| public static final KeyCode | NONCONVERT
Constant for the Don't Convert function key. |
| public static final KeyCode | NUM_LOCK
Constant for the |
| public static final KeyCode | NUMBER_SIGN
Constant for the "#" key. |
| public static final KeyCode | NUMPAD0
Constant for the |
| public static final KeyCode | NUMPAD1
Constant for the |
| public static final KeyCode | NUMPAD2
Constant for the |
| public static final KeyCode | NUMPAD3
Constant for the |
| public static final KeyCode | NUMPAD4
Constant for the |
| public static final KeyCode | NUMPAD5
Constant for the |
| public static final KeyCode | NUMPAD6
Constant for the |
| public static final KeyCode | NUMPAD7
Constant for the |
| public static final KeyCode | NUMPAD8
Constant for the |
| public static final KeyCode | NUMPAD9
Constant for the |
| public static final KeyCode | O
Constant for the |
| public static final KeyCode | OPEN_BRACKET
Constant for the open bracket key, "[" |
| public static final KeyCode | P
Constant for the |
| public static final KeyCode | PAGE_DOWN
Constant for the |
| public static final KeyCode | PAGE_UP
Constant for the |
| public static final KeyCode | PASTE
Constant for the |
| public static final KeyCode | PAUSE
Constant for the |
| public static final KeyCode | PERIOD
Constant for the period key, "." |
| public static final KeyCode | PLAY
Constant for the |
| public static final KeyCode | PLUS
Constant for the "+" key. |
| public static final KeyCode | POUND
Constant for the |
| public static final KeyCode | POWER
Constant for the |
| public static final KeyCode | PREVIOUS_CANDIDATE
Constant for the Previous Candidate function key. |
| public static final KeyCode | PRINTSCREEN
Constant for the |
| public static final KeyCode | PROPS
Constant for the |
| public static final KeyCode | Q
Constant for the |
| public static final KeyCode | QUOTE
Constant for the |
| public static final KeyCode | QUOTEDBL
Constant for the |
| public static final KeyCode | R
Constant for the |
| public static final KeyCode | RECORD
Constant for the |
| public static final KeyCode | REWIND
Constant for the |
| public static final KeyCode | RIGHT
Constant for the non-numpad right arrow key. |
| public static final KeyCode | RIGHT_PARENTHESIS
Constant for the ")" key. |
| public static final KeyCode | ROMAN_CHARACTERS
Constant for the Roman Characters function key. |
| public static final KeyCode | S
Constant for the |
| public static final KeyCode | SCROLL_LOCK
Constant for the |
| public static final KeyCode | SEMICOLON
Constant for the semicolon key, ";" |
| public static final KeyCode | SEPARATOR
Constant for the Numpad Separator key. |
| public static final KeyCode | SHIFT
Constant for the |
| public static final KeyCode | SHORTCUT
Constant for the |
| public static final KeyCode | SLASH
Constant for the forward slash key, "/" |
| public static final KeyCode | SOFTKEY_0
Constant for the |
| public static final KeyCode | SOFTKEY_1
Constant for the |
| public static final KeyCode | SOFTKEY_2
Constant for the |
| public static final KeyCode | SOFTKEY_3
Constant for the |
| public static final KeyCode | SOFTKEY_4
Constant for the |
| public static final KeyCode | SOFTKEY_5
Constant for the |
| public static final KeyCode | SOFTKEY_6
Constant for the |
| public static final KeyCode | SOFTKEY_7
Constant for the |
| public static final KeyCode | SOFTKEY_8
Constant for the |
| public static final KeyCode | SOFTKEY_9
Constant for the |
| public static final KeyCode | SPACE
Constant for the |
| public static final KeyCode | STAR
Constant for the |
| public static final KeyCode | STOP
Constant for the |
| public static final KeyCode | SUBTRACT
Constant for the |
| public static final KeyCode | T
Constant for the |
| public static final KeyCode | TAB
Constant for the |
| public static final KeyCode | TRACK_NEXT
Constant for the |
| public static final KeyCode | TRACK_PREV
Constant for the |
| public static final KeyCode | U
Constant for the |
| public static final KeyCode | UNDEFINED
This value is used to indicate that the keyCode is unknown. |
| public static final KeyCode | UNDERSCORE
Constant for the "_" key. |
| public static final KeyCode | UNDO
Constant for the |
| public static final KeyCode | UP
Constant for the non-numpad up arrow key. |
| public static final KeyCode | V
Constant for the |
| public static final KeyCode | VOLUME_DOWN
Constant for the |
| public static final KeyCode | VOLUME_UP
Constant for the |
| public static final KeyCode | W
Constant for the |
| public static final KeyCode | WINDOWS
Constant for the Microsoft Windows "Windows" key. |
| public static final KeyCode | X
Constant for the |
| public static final KeyCode | Y
Constant for the |
| public static final KeyCode | Z
Constant for the |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final String | |
| public final int | |
| public static KeyCode | Returns: KeyCode for the key with the given name, null if the string is unknownTextual representation of the key name)Parses textual representation of a key. |
| public final String | |
| public final boolean | Returns: true if this key code corresponds to an arrow keyLeft, right, up, down keys (including the keypad arrows) |
| public final boolean | Returns: true if this key code corresponds to a digit keyAll Digit keys (including the keypad digits) |
| public final boolean | Returns: true if this key code corresponds to a functional keyFunction keys like F1, F2, etc... |
| public final boolean | |
| public final boolean | |
| public final boolean | Returns: true if this key code corresponds to a media keyAll multimedia keys (channel up/down, volume control, etc...) |
| public final boolean | Returns: true if this key code corresponds to a modifier keyKeys that could act as a modifier |
| public final boolean | Returns: true if this key code corresponds to a navigation keyNavigation keys are arrow keys and Page Down, Page Up, Home, End (including keypad keys) |
| public final boolean | |
| public static KeyCode | |
| public static KeyCode[] |