- java.lang.Object
-
- java.lang.Enum<KeyCode>
-
- javafx.scene.input.KeyCode
-
- All Implemented Interfaces:
Serializable
,Comparable<KeyCode>
public enum KeyCode extends Enum<KeyCode>
Set of key codes forKeyEvent
objects.- Since:
- JavaFX 2.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description A
Constant for theA
key.ACCEPT
Constant for the Accept or Commit function key.ADD
Constant for theAdd
key.AGAIN
Constant for theAgain
key.ALL_CANDIDATES
Constant for the All Candidates function key.ALPHANUMERIC
Constant for the Alphanumeric function key.ALT
Constant for theAlt
key.ALT_GRAPH
Constant for the AltGraph function key.AMPERSAND
Constant for theAmpersand
key.ASTERISK
Constant for theAsterisk
key.AT
Constant for the "@" key.B
Constant for theB
key.BACK_QUOTE
Constant for theBack Quote
key.BACK_SLASH
Constant for the back slash key, "\"BACK_SPACE
Constant for theBackspace
key.BEGIN
Constant for the Begin key.BRACELEFT
Constant for theLeft Brace
key.BRACERIGHT
Constant for theRight Brace
key.C
Constant for theC
key.CANCEL
Constant for theCancel
key.CAPS
Constant for theCaps Lock
key.CHANNEL_DOWN
Constant for theChannel Down
key.CHANNEL_UP
Constant for theChannel Up
key.CIRCUMFLEX
Constant for the "^" key.CLEAR
Constant for theClear
key.CLOSE_BRACKET
Constant for the close bracket key, "]"CODE_INPUT
Constant for the Code Input function key.COLON
Constant for the ":" key.COLORED_KEY_0
Constant for theColored Key 0
key.COLORED_KEY_1
Constant for theColored Key 1
key.COLORED_KEY_2
Constant for theColored Key 2
key.COLORED_KEY_3
Constant for theColored Key 3
key.COMMA
Constant for the comma key, ","COMMAND
Constant for the AppleCommand
key.COMPOSE
Constant for the input method on/off key.CONTEXT_MENU
Constant for the Microsoft Windows Context Menu key.CONTROL
Constant for theCtrl
key.CONVERT
Constant for the Convert function key.COPY
Constant for theCopy
key.CUT
Constant for theCut
key.D
Constant for theD
key.DEAD_ABOVEDOT
Constant for theDead Abovedot
key.DEAD_ABOVERING
Constant for theDead Abovering
key.DEAD_ACUTE
Constant for theDead Acute
key.DEAD_BREVE
Constant for theDead Breve
key.DEAD_CARON
Constant for theDead Caron
key.DEAD_CEDILLA
Constant for theDead Cedilla
key.DEAD_CIRCUMFLEX
Constant for theDead Circumflex
key.DEAD_DIAERESIS
Constant for theDead Diaeresis
key.DEAD_DOUBLEACUTE
Constant for theDead Doubleacute
key.DEAD_GRAVE
Constant for theDead Grave
key.DEAD_IOTA
Constant for theDead Iota
key.DEAD_MACRON
Constant for theDead Macron
key.DEAD_OGONEK
Constant for theDead Ogonek
key.DEAD_SEMIVOICED_SOUND
Constant for theDead Semivoiced Sound
key.DEAD_TILDE
Constant for theDead Tilde
key.DEAD_VOICED_SOUND
Constant for theDead Voiced Sound
key.DECIMAL
Constant for theDecimal
key.DELETE
Constant for theDelete
key.DIGIT0
Constant for the0
key.DIGIT1
Constant for the1
key.DIGIT2
Constant for the2
key.DIGIT3
Constant for the3
key.DIGIT4
Constant for the4
key.DIGIT5
Constant for the5
key.DIGIT6
Constant for the6
key.DIGIT7
Constant for the7
key.DIGIT8
Constant for the8
key.DIGIT9
Constant for the9
key.DIVIDE
Constant for theDivide
key.DOLLAR
Constant for the "$" key.DOWN
Constant for the non-numpad down arrow key.E
Constant for theE
key.EJECT_TOGGLE
Constant for theEject
key.END
Constant for theEnd
key.ENTER
Constant for theEnter
key.EQUALS
Constant for the equals key, "="ESCAPE
Constant for theEsc
key.EURO_SIGN
Constant for the Euro currency sign key.EXCLAMATION_MARK
Constant for the "!"F
Constant for theF
key.F1
Constant for the F1 function key.F10
Constant for the F10 function key.F11
Constant for the F11 function key.F12
Constant for the F12 function key.F13
Constant for the F13 function key.F14
Constant for the F14 function key.F15
Constant for the F15 function key.F16
Constant for the F16 function key.F17
Constant for the F17 function key.F18
Constant for the F18 function key.F19
Constant for the F19 function key.F2
Constant for the F2 function key.F20
Constant for the F20 function key.F21
Constant for the F21 function key.F22
Constant for the F22 function key.F23
Constant for the F23 function key.F24
Constant for the F24 function key.F3
Constant for the F3 function key.F4
Constant for the F4 function key.F5
Constant for the F5 function key.F6
Constant for the F6 function key.F7
Constant for the F7 function key.F8
Constant for the F8 function key.F9
Constant for the F9 function key.FAST_FWD
Constant for theFast Forward
key.FINAL
Constant for input method support on Asian Keyboards.FIND
Constant for theFind
key.FULL_WIDTH
Constant for the Full-Width Characters function key.G
Constant for theG
key.GAME_A
Constant for theGame A
key.GAME_B
Constant for theGame B
key.GAME_C
Constant for theGame C
key.GAME_D
Constant for theGame D
key.GREATER
Constant for theGreater
key.H
Constant for theH
key.HALF_WIDTH
Constant for the Half-Width Characters function key.HELP
Constant for theHelp
key.HIRAGANA
Constant for the Hiragana function key.HOME
Constant for theHome
key.I
Constant for theI
key.INFO
Constant for theInfo
key.INPUT_METHOD_ON_OFF
Constant for the input method on/off key.INSERT
Constant for theInsert
key.INVERTED_EXCLAMATION_MARK
Constant for the inverted exclamation mark key.J
Constant for theJ
key.JAPANESE_HIRAGANA
Constant for the Japanese-Hiragana function key.JAPANESE_KATAKANA
Constant for the Japanese-Katakana function key.JAPANESE_ROMAN
Constant for the Japanese-Roman function key.K
Constant for theK
key.KANA
Constant for theKana
key.KANA_LOCK
Constant for the locking Kana function key.KANJI
Constant for theKanji
key.KATAKANA
Constant for the Katakana function key.KP_DOWN
Constant for the numeric keypad down arrow key.KP_LEFT
Constant for the numeric keypad left arrow key.KP_RIGHT
Constant for the numeric keypad right arrow key.KP_UP
Constant for the numeric keypad up arrow key.L
Constant for theL
key.LEFT
Constant for the non-numpad left arrow key.LEFT_PARENTHESIS
Constant for the "(" key.LESS
Constant for theLess
key.M
Constant for theM
key.META
Constant for theMeta
key.MINUS
Constant for the minus key, "-"MODECHANGE
Constant for theMode Change
key.MULTIPLY
Constant for theMultiply
key.MUTE
Constant for theMute
key.N
Constant for theN
key.NONCONVERT
Constant for the Don't Convert function key.NUM_LOCK
Constant for theNum Lock
key.NUMBER_SIGN
Constant for the "#" key.NUMPAD0
Constant for theNumpad 0
key.NUMPAD1
Constant for theNumpad 1
key.NUMPAD2
Constant for theNumpad 2
key.NUMPAD3
Constant for theNumpad 3
key.NUMPAD4
Constant for theNumpad 4
key.NUMPAD5
Constant for theNumpad 5
key.NUMPAD6
Constant for theNumpad 6
key.NUMPAD7
Constant for theNumpad 7
key.NUMPAD8
Constant for theNumpad 8
key.NUMPAD9
Constant for theNumpad 9
key.O
Constant for theO
key.OPEN_BRACKET
Constant for the open bracket key, "["P
Constant for theP
key.PAGE_DOWN
Constant for thePage Down
key.PAGE_UP
Constant for thePage Up
key.PASTE
Constant for thePaste
key.PAUSE
Constant for thePause
key.PERIOD
Constant for the period key, "."PLAY
Constant for thePlay
key.PLUS
Constant for the "+" key.POUND
Constant for thePound
key.POWER
Constant for thePower
key.PREVIOUS_CANDIDATE
Constant for the Previous Candidate function key.PRINTSCREEN
Constant for thePrint Screen
key.PROPS
Constant for theProperties
key.Q
Constant for theQ
key.QUOTE
Constant for theQuote
key.QUOTEDBL
Constant for theDouble Quote
key.R
Constant for theR
key.RECORD
Constant for theRecord
key.REWIND
Constant for theRewind
key.RIGHT
Constant for the non-numpad right arrow key.RIGHT_PARENTHESIS
Constant for the ")" key.ROMAN_CHARACTERS
Constant for the Roman Characters function key.S
Constant for theS
key.SCROLL_LOCK
Constant for theScroll Lock
key.SEMICOLON
Constant for the semicolon key, ";"SEPARATOR
Constant for the Numpad Separator key.SHIFT
Constant for theShift
key.SHORTCUT
Constant for theShortcut
key.SLASH
Constant for the forward slash key, "/"SOFTKEY_0
Constant for theSoftkey 0
key.SOFTKEY_1
Constant for theSoftkey 1
key.SOFTKEY_2
Constant for theSoftkey 2
key.SOFTKEY_3
Constant for theSoftkey 3
key.SOFTKEY_4
Constant for theSoftkey 4
key.SOFTKEY_5
Constant for theSoftkey 5
key.SOFTKEY_6
Constant for theSoftkey 6
key.SOFTKEY_7
Constant for theSoftkey 7
key.SOFTKEY_8
Constant for theSoftkey 8
key.SOFTKEY_9
Constant for theSoftkey 9
key.SPACE
Constant for theSpace
key.STAR
Constant for theStar
key.STOP
Constant for theStop
key.SUBTRACT
Constant for theSubtract
key.T
Constant for theT
key.TAB
Constant for theTab
key.TRACK_NEXT
Constant for theNext Track
key.TRACK_PREV
Constant for thePrevious Track
key.U
Constant for theU
key.UNDEFINED
This value is used to indicate that the keyCode is unknown.UNDERSCORE
Constant for the "_" key.UNDO
Constant for theUndo
key.UP
Constant for the non-numpad up arrow key.V
Constant for theV
key.VOLUME_DOWN
Constant for theVolume Down
key.VOLUME_UP
Constant for theVolume Up
key.W
Constant for theW
key.WINDOWS
Constant for the Microsoft Windows "Windows" key.X
Constant for theX
key.Y
Constant for theY
key.Z
Constant for theZ
key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getChar()
Returns the character element of this key code, which is simply a mapping of the underlying platform code returned bygetCode()
.int
getCode()
Returns the underlying platform code used to represent thecharacter
in the key code.static KeyCode
getKeyCode(String name)
Parses textual representation of a key.String
getName()
Gets name of this key code.boolean
isArrowKey()
Left, right, up, down keys (including the keypad arrows)boolean
isDigitKey()
All Digit keys (including the keypad digits)boolean
isFunctionKey()
Function keys like F1, F2, etc...boolean
isKeypadKey()
All keys on the keypadboolean
isLetterKey()
All keys with lettersboolean
isMediaKey()
All multimedia keys (channel up/down, volume control, etc...)boolean
isModifierKey()
Keys that could act as a modifierboolean
isNavigationKey()
Navigation keys are arrow keys and Page Down, Page Up, Home, End (including keypad keys)boolean
isWhitespaceKey()
Space, tab and enterstatic KeyCode
valueOf(String name)
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 Detail
-
ENTER
public static final KeyCode ENTER
Constant for theEnter
key.
-
BACK_SPACE
public static final KeyCode BACK_SPACE
Constant for theBackspace
key.
-
TAB
public static final KeyCode TAB
Constant for theTab
key.
-
CANCEL
public static final KeyCode CANCEL
Constant for theCancel
key.
-
CLEAR
public static final KeyCode CLEAR
Constant for theClear
key.
-
SHIFT
public static final KeyCode SHIFT
Constant for theShift
key.
-
CONTROL
public static final KeyCode CONTROL
Constant for theCtrl
key.
-
ALT
public static final KeyCode ALT
Constant for theAlt
key.
-
PAUSE
public static final KeyCode PAUSE
Constant for thePause
key.
-
CAPS
public static final KeyCode CAPS
Constant for theCaps Lock
key.
-
ESCAPE
public static final KeyCode ESCAPE
Constant for theEsc
key.
-
SPACE
public static final KeyCode SPACE
Constant for theSpace
key.
-
PAGE_UP
public static final KeyCode PAGE_UP
Constant for thePage Up
key.
-
PAGE_DOWN
public static final KeyCode PAGE_DOWN
Constant for thePage Down
key.
-
END
public static final KeyCode END
Constant for theEnd
key.
-
HOME
public static final KeyCode HOME
Constant for theHome
key.
-
LEFT
public static final KeyCode LEFT
Constant for the non-numpad left arrow key.
-
UP
public static final KeyCode UP
Constant for the non-numpad up arrow key.
-
RIGHT
public static final KeyCode RIGHT
Constant for the non-numpad right arrow key.
-
DOWN
public static final KeyCode DOWN
Constant for the non-numpad down arrow key.
-
COMMA
public static final KeyCode COMMA
Constant for the comma key, ","
-
MINUS
public static final KeyCode MINUS
Constant for the minus key, "-"
-
PERIOD
public static final KeyCode PERIOD
Constant for the period key, "."
-
SLASH
public static final KeyCode SLASH
Constant for the forward slash key, "/"
-
DIGIT0
public static final KeyCode DIGIT0
Constant for the0
key.
-
DIGIT1
public static final KeyCode DIGIT1
Constant for the1
key.
-
DIGIT2
public static final KeyCode DIGIT2
Constant for the2
key.
-
DIGIT3
public static final KeyCode DIGIT3
Constant for the3
key.
-
DIGIT4
public static final KeyCode DIGIT4
Constant for the4
key.
-
DIGIT5
public static final KeyCode DIGIT5
Constant for the5
key.
-
DIGIT6
public static final KeyCode DIGIT6
Constant for the6
key.
-
DIGIT7
public static final KeyCode DIGIT7
Constant for the7
key.
-
DIGIT8
public static final KeyCode DIGIT8
Constant for the8
key.
-
DIGIT9
public static final KeyCode DIGIT9
Constant for the9
key.
-
SEMICOLON
public static final KeyCode SEMICOLON
Constant for the semicolon key, ";"
-
EQUALS
public static final KeyCode EQUALS
Constant for the equals key, "="
-
A
public static final KeyCode A
Constant for theA
key.
-
B
public static final KeyCode B
Constant for theB
key.
-
C
public static final KeyCode C
Constant for theC
key.
-
D
public static final KeyCode D
Constant for theD
key.
-
E
public static final KeyCode E
Constant for theE
key.
-
F
public static final KeyCode F
Constant for theF
key.
-
G
public static final KeyCode G
Constant for theG
key.
-
H
public static final KeyCode H
Constant for theH
key.
-
I
public static final KeyCode I
Constant for theI
key.
-
J
public static final KeyCode J
Constant for theJ
key.
-
K
public static final KeyCode K
Constant for theK
key.
-
L
public static final KeyCode L
Constant for theL
key.
-
M
public static final KeyCode M
Constant for theM
key.
-
N
public static final KeyCode N
Constant for theN
key.
-
O
public static final KeyCode O
Constant for theO
key.
-
P
public static final KeyCode P
Constant for theP
key.
-
Q
public static final KeyCode Q
Constant for theQ
key.
-
R
public static final KeyCode R
Constant for theR
key.
-
S
public static final KeyCode S
Constant for theS
key.
-
T
public static final KeyCode T
Constant for theT
key.
-
U
public static final KeyCode U
Constant for theU
key.
-
V
public static final KeyCode V
Constant for theV
key.
-
W
public static final KeyCode W
Constant for theW
key.
-
X
public static final KeyCode X
Constant for theX
key.
-
Y
public static final KeyCode Y
Constant for theY
key.
-
Z
public static final KeyCode Z
Constant for theZ
key.
-
OPEN_BRACKET
public static final KeyCode OPEN_BRACKET
Constant for the open bracket key, "["
-
BACK_SLASH
public static final KeyCode BACK_SLASH
Constant for the back slash key, "\"
-
CLOSE_BRACKET
public static final KeyCode CLOSE_BRACKET
Constant for the close bracket key, "]"
-
NUMPAD0
public static final KeyCode NUMPAD0
Constant for theNumpad 0
key.
-
NUMPAD1
public static final KeyCode NUMPAD1
Constant for theNumpad 1
key.
-
NUMPAD2
public static final KeyCode NUMPAD2
Constant for theNumpad 2
key.
-
NUMPAD3
public static final KeyCode NUMPAD3
Constant for theNumpad 3
key.
-
NUMPAD4
public static final KeyCode NUMPAD4
Constant for theNumpad 4
key.
-
NUMPAD5
public static final KeyCode NUMPAD5
Constant for theNumpad 5
key.
-
NUMPAD6
public static final KeyCode NUMPAD6
Constant for theNumpad 6
key.
-
NUMPAD7
public static final KeyCode NUMPAD7
Constant for theNumpad 7
key.
-
NUMPAD8
public static final KeyCode NUMPAD8
Constant for theNumpad 8
key.
-
NUMPAD9
public static final KeyCode NUMPAD9
Constant for theNumpad 9
key.
-
MULTIPLY
public static final KeyCode MULTIPLY
Constant for theMultiply
key.
-
ADD
public static final KeyCode ADD
Constant for theAdd
key.
-
SEPARATOR
public static final KeyCode SEPARATOR
Constant for the Numpad Separator key.
-
SUBTRACT
public static final KeyCode SUBTRACT
Constant for theSubtract
key.
-
DECIMAL
public static final KeyCode DECIMAL
Constant for theDecimal
key.
-
DIVIDE
public static final KeyCode DIVIDE
Constant for theDivide
key.
-
DELETE
public static final KeyCode DELETE
Constant for theDelete
key.
-
NUM_LOCK
public static final KeyCode NUM_LOCK
Constant for theNum Lock
key.
-
SCROLL_LOCK
public static final KeyCode SCROLL_LOCK
Constant for theScroll Lock
key.
-
F1
public static final KeyCode F1
Constant for the F1 function key.
-
F2
public static final KeyCode F2
Constant for the F2 function key.
-
F3
public static final KeyCode F3
Constant for the F3 function key.
-
F4
public static final KeyCode F4
Constant for the F4 function key.
-
F5
public static final KeyCode F5
Constant for the F5 function key.
-
F6
public static final KeyCode F6
Constant for the F6 function key.
-
F7
public static final KeyCode F7
Constant for the F7 function key.
-
F8
public static final KeyCode F8
Constant for the F8 function key.
-
F9
public static final KeyCode F9
Constant for the F9 function key.
-
F10
public static final KeyCode F10
Constant for the F10 function key.
-
F11
public static final KeyCode F11
Constant for the F11 function key.
-
F12
public static final KeyCode F12
Constant for the F12 function key.
-
F13
public static final KeyCode F13
Constant for the F13 function key.
-
F14
public static final KeyCode F14
Constant for the F14 function key.
-
F15
public static final KeyCode F15
Constant for the F15 function key.
-
F16
public static final KeyCode F16
Constant for the F16 function key.
-
F17
public static final KeyCode F17
Constant for the F17 function key.
-
F18
public static final KeyCode F18
Constant for the F18 function key.
-
F19
public static final KeyCode F19
Constant for the F19 function key.
-
F20
public static final KeyCode F20
Constant for the F20 function key.
-
F21
public static final KeyCode F21
Constant for the F21 function key.
-
F22
public static final KeyCode F22
Constant for the F22 function key.
-
F23
public static final KeyCode F23
Constant for the F23 function key.
-
F24
public static final KeyCode F24
Constant for the F24 function key.
-
PRINTSCREEN
public static final KeyCode PRINTSCREEN
Constant for thePrint Screen
key.
-
INSERT
public static final KeyCode INSERT
Constant for theInsert
key.
-
HELP
public static final KeyCode HELP
Constant for theHelp
key.
-
META
public static final KeyCode META
Constant for theMeta
key.
-
BACK_QUOTE
public static final KeyCode BACK_QUOTE
Constant for theBack Quote
key.
-
QUOTE
public static final KeyCode QUOTE
Constant for theQuote
key.
-
KP_UP
public static final KeyCode KP_UP
Constant for the numeric keypad up arrow key.
-
KP_DOWN
public static final KeyCode KP_DOWN
Constant for the numeric keypad down arrow key.
-
KP_LEFT
public static final KeyCode KP_LEFT
Constant for the numeric keypad left arrow key.
-
KP_RIGHT
public static final KeyCode KP_RIGHT
Constant for the numeric keypad right arrow key.
-
DEAD_GRAVE
public static final KeyCode DEAD_GRAVE
Constant for theDead Grave
key.
-
DEAD_ACUTE
public static final KeyCode DEAD_ACUTE
Constant for theDead Acute
key.
-
DEAD_CIRCUMFLEX
public static final KeyCode DEAD_CIRCUMFLEX
Constant for theDead Circumflex
key.
-
DEAD_TILDE
public static final KeyCode DEAD_TILDE
Constant for theDead Tilde
key.
-
DEAD_MACRON
public static final KeyCode DEAD_MACRON
Constant for theDead Macron
key.
-
DEAD_BREVE
public static final KeyCode DEAD_BREVE
Constant for theDead Breve
key.
-
DEAD_ABOVEDOT
public static final KeyCode DEAD_ABOVEDOT
Constant for theDead Abovedot
key.
-
DEAD_DIAERESIS
public static final KeyCode DEAD_DIAERESIS
Constant for theDead Diaeresis
key.
-
DEAD_ABOVERING
public static final KeyCode DEAD_ABOVERING
Constant for theDead Abovering
key.
-
DEAD_DOUBLEACUTE
public static final KeyCode DEAD_DOUBLEACUTE
Constant for theDead Doubleacute
key.
-
DEAD_CARON
public static final KeyCode DEAD_CARON
Constant for theDead Caron
key.
-
DEAD_CEDILLA
public static final KeyCode DEAD_CEDILLA
Constant for theDead Cedilla
key.
-
DEAD_OGONEK
public static final KeyCode DEAD_OGONEK
Constant for theDead Ogonek
key.
-
DEAD_IOTA
public static final KeyCode DEAD_IOTA
Constant for theDead Iota
key.
-
DEAD_VOICED_SOUND
public static final KeyCode DEAD_VOICED_SOUND
Constant for theDead Voiced Sound
key.
-
DEAD_SEMIVOICED_SOUND
public static final KeyCode DEAD_SEMIVOICED_SOUND
Constant for theDead Semivoiced Sound
key.
-
AMPERSAND
public static final KeyCode AMPERSAND
Constant for theAmpersand
key.
-
ASTERISK
public static final KeyCode ASTERISK
Constant for theAsterisk
key.
-
QUOTEDBL
public static final KeyCode QUOTEDBL
Constant for theDouble Quote
key.
-
LESS
public static final KeyCode LESS
Constant for theLess
key.
-
GREATER
public static final KeyCode GREATER
Constant for theGreater
key.
-
BRACELEFT
public static final KeyCode BRACELEFT
Constant for theLeft Brace
key.
-
BRACERIGHT
public static final KeyCode BRACERIGHT
Constant for theRight Brace
key.
-
AT
public static final KeyCode AT
Constant for the "@" key.
-
COLON
public static final KeyCode COLON
Constant for the ":" key.
-
CIRCUMFLEX
public static final KeyCode CIRCUMFLEX
Constant for the "^" key.
-
DOLLAR
public static final KeyCode DOLLAR
Constant for the "$" key.
-
EURO_SIGN
public static final KeyCode EURO_SIGN
Constant for the Euro currency sign key.
-
EXCLAMATION_MARK
public static final KeyCode EXCLAMATION_MARK
Constant for the "!" key.
-
INVERTED_EXCLAMATION_MARK
public static final KeyCode INVERTED_EXCLAMATION_MARK
Constant for the inverted exclamation mark key.
-
LEFT_PARENTHESIS
public static final KeyCode LEFT_PARENTHESIS
Constant for the "(" key.
-
NUMBER_SIGN
public static final KeyCode NUMBER_SIGN
Constant for the "#" key.
-
PLUS
public static final KeyCode PLUS
Constant for the "+" key.
-
RIGHT_PARENTHESIS
public static final KeyCode RIGHT_PARENTHESIS
Constant for the ")" key.
-
UNDERSCORE
public static final KeyCode UNDERSCORE
Constant for the "_" key.
-
WINDOWS
public static final KeyCode WINDOWS
Constant for the Microsoft Windows "Windows" key. It is used for both the left and right version of the key.
-
CONTEXT_MENU
public static final KeyCode CONTEXT_MENU
Constant for the Microsoft Windows Context Menu key.
-
FINAL
public static final KeyCode FINAL
Constant for input method support on Asian Keyboards.
-
CONVERT
public static final KeyCode CONVERT
Constant for the Convert function key.
-
NONCONVERT
public static final KeyCode NONCONVERT
Constant for the Don't Convert function key.
-
ACCEPT
public static final KeyCode ACCEPT
Constant for the Accept or Commit function key.
-
MODECHANGE
public static final KeyCode MODECHANGE
Constant for theMode Change
key.
-
KANA
public static final KeyCode KANA
Constant for theKana
key.
-
KANJI
public static final KeyCode KANJI
Constant for theKanji
key.
-
ALPHANUMERIC
public static final KeyCode ALPHANUMERIC
Constant for the Alphanumeric function key.
-
KATAKANA
public static final KeyCode KATAKANA
Constant for the Katakana function key.
-
HIRAGANA
public static final KeyCode HIRAGANA
Constant for the Hiragana function key.
-
FULL_WIDTH
public static final KeyCode FULL_WIDTH
Constant for the Full-Width Characters function key.
-
HALF_WIDTH
public static final KeyCode HALF_WIDTH
Constant for the Half-Width Characters function key.
-
ROMAN_CHARACTERS
public static final KeyCode ROMAN_CHARACTERS
Constant for the Roman Characters function key.
-
ALL_CANDIDATES
public static final KeyCode ALL_CANDIDATES
Constant for the All Candidates function key.
-
PREVIOUS_CANDIDATE
public static final KeyCode PREVIOUS_CANDIDATE
Constant for the Previous Candidate function key.
-
CODE_INPUT
public static final KeyCode CODE_INPUT
Constant for the Code Input function key.
-
JAPANESE_KATAKANA
public static final KeyCode JAPANESE_KATAKANA
Constant for the Japanese-Katakana function key. This key switches to a Japanese input method and selects its Katakana input mode.
-
JAPANESE_HIRAGANA
public static final KeyCode JAPANESE_HIRAGANA
Constant for the Japanese-Hiragana function key. This key switches to a Japanese input method and selects its Hiragana input mode.
-
JAPANESE_ROMAN
public static final KeyCode JAPANESE_ROMAN
Constant for the Japanese-Roman function key. This key switches to a Japanese input method and selects its Roman-Direct input mode.
-
KANA_LOCK
public static final KeyCode KANA_LOCK
Constant for the locking Kana function key. This key locks the keyboard into a Kana layout.
-
INPUT_METHOD_ON_OFF
public static final KeyCode INPUT_METHOD_ON_OFF
Constant for the input method on/off key.
-
CUT
public static final KeyCode CUT
Constant for theCut
key.
-
COPY
public static final KeyCode COPY
Constant for theCopy
key.
-
PASTE
public static final KeyCode PASTE
Constant for thePaste
key.
-
UNDO
public static final KeyCode UNDO
Constant for theUndo
key.
-
AGAIN
public static final KeyCode AGAIN
Constant for theAgain
key.
-
FIND
public static final KeyCode FIND
Constant for theFind
key.
-
PROPS
public static final KeyCode PROPS
Constant for theProperties
key.
-
STOP
public static final KeyCode STOP
Constant for theStop
key.
-
COMPOSE
public static final KeyCode COMPOSE
Constant for the input method on/off key.
-
ALT_GRAPH
public static final KeyCode ALT_GRAPH
Constant for the AltGraph function key.
-
BEGIN
public static final KeyCode BEGIN
Constant for the Begin key.
-
UNDEFINED
public static final KeyCode UNDEFINED
This value is used to indicate that the keyCode is unknown. Key typed events do not have a keyCode value; this value is used instead.
-
SOFTKEY_0
public static final KeyCode SOFTKEY_0
Constant for theSoftkey 0
key.
-
SOFTKEY_1
public static final KeyCode SOFTKEY_1
Constant for theSoftkey 1
key.
-
SOFTKEY_2
public static final KeyCode SOFTKEY_2
Constant for theSoftkey 2
key.
-
SOFTKEY_3
public static final KeyCode SOFTKEY_3
Constant for theSoftkey 3
key.
-
SOFTKEY_4
public static final KeyCode SOFTKEY_4
Constant for theSoftkey 4
key.
-
SOFTKEY_5
public static final KeyCode SOFTKEY_5
Constant for theSoftkey 5
key.
-
SOFTKEY_6
public static final KeyCode SOFTKEY_6
Constant for theSoftkey 6
key.
-
SOFTKEY_7
public static final KeyCode SOFTKEY_7
Constant for theSoftkey 7
key.
-
SOFTKEY_8
public static final KeyCode SOFTKEY_8
Constant for theSoftkey 8
key.
-
SOFTKEY_9
public static final KeyCode SOFTKEY_9
Constant for theSoftkey 9
key.
-
GAME_A
public static final KeyCode GAME_A
Constant for theGame A
key.
-
GAME_B
public static final KeyCode GAME_B
Constant for theGame B
key.
-
GAME_C
public static final KeyCode GAME_C
Constant for theGame C
key.
-
GAME_D
public static final KeyCode GAME_D
Constant for theGame D
key.
-
STAR
public static final KeyCode STAR
Constant for theStar
key.
-
POUND
public static final KeyCode POUND
Constant for thePound
key.
-
POWER
public static final KeyCode POWER
Constant for thePower
key.
-
INFO
public static final KeyCode INFO
Constant for theInfo
key.
-
COLORED_KEY_0
public static final KeyCode COLORED_KEY_0
Constant for theColored Key 0
key.
-
COLORED_KEY_1
public static final KeyCode COLORED_KEY_1
Constant for theColored Key 1
key.
-
COLORED_KEY_2
public static final KeyCode COLORED_KEY_2
Constant for theColored Key 2
key.
-
COLORED_KEY_3
public static final KeyCode COLORED_KEY_3
Constant for theColored Key 3
key.
-
EJECT_TOGGLE
public static final KeyCode EJECT_TOGGLE
Constant for theEject
key.
-
PLAY
public static final KeyCode PLAY
Constant for thePlay
key.
-
RECORD
public static final KeyCode RECORD
Constant for theRecord
key.
-
FAST_FWD
public static final KeyCode FAST_FWD
Constant for theFast Forward
key.
-
REWIND
public static final KeyCode REWIND
Constant for theRewind
key.
-
TRACK_PREV
public static final KeyCode TRACK_PREV
Constant for thePrevious Track
key.
-
TRACK_NEXT
public static final KeyCode TRACK_NEXT
Constant for theNext Track
key.
-
CHANNEL_UP
public static final KeyCode CHANNEL_UP
Constant for theChannel Up
key.
-
CHANNEL_DOWN
public static final KeyCode CHANNEL_DOWN
Constant for theChannel Down
key.
-
VOLUME_UP
public static final KeyCode VOLUME_UP
Constant for theVolume Up
key.
-
VOLUME_DOWN
public static final KeyCode VOLUME_DOWN
Constant for theVolume Down
key.
-
MUTE
public static final KeyCode MUTE
Constant for theMute
key.
-
COMMAND
public static final KeyCode COMMAND
Constant for the AppleCommand
key.- Since:
- JavaFX 2.1
-
SHORTCUT
public static final KeyCode SHORTCUT
Constant for theShortcut
key.
-
-
Method Detail
-
values
public static KeyCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyCode c : KeyCode.values()) System.out.println(c);
- 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 nameNullPointerException
- if the argument is null
-
isFunctionKey
public final boolean isFunctionKey()
Function keys like F1, F2, etc...- Returns:
- true if this key code corresponds to a functional key
- Since:
- JavaFX 2.2
-
isNavigationKey
public final boolean isNavigationKey()
Navigation keys are arrow keys and Page Down, Page Up, Home, End (including keypad keys)- Returns:
- true if this key code corresponds to a navigation key
- Since:
- JavaFX 2.2
-
isArrowKey
public final boolean isArrowKey()
Left, right, up, down keys (including the keypad arrows)- Returns:
- true if this key code corresponds to an arrow key
- Since:
- JavaFX 2.2
-
isModifierKey
public final boolean isModifierKey()
Keys that could act as a modifier- Returns:
- true if this key code corresponds to a modifier key
- Since:
- JavaFX 2.2
-
isLetterKey
public final boolean isLetterKey()
All keys with letters- Returns:
- true if this key code corresponds to a letter key
- Since:
- JavaFX 2.2
-
isDigitKey
public final boolean isDigitKey()
All Digit keys (including the keypad digits)- Returns:
- true if this key code corresponds to a digit key
- Since:
- JavaFX 2.2
-
isKeypadKey
public final boolean isKeypadKey()
All keys on the keypad- Returns:
- true if this key code corresponds to a keypad key
- Since:
- JavaFX 2.2
-
isWhitespaceKey
public final boolean isWhitespaceKey()
Space, tab and enter- Returns:
- true if this key code corresponds to a whitespace key
- Since:
- JavaFX 2.2
-
isMediaKey
public final boolean isMediaKey()
All multimedia keys (channel up/down, volume control, etc...)- Returns:
- true if this key code corresponds to a media key
- Since:
- JavaFX 2.2
-
getName
public final String getName()
Gets name of this key code.- Returns:
- Name of this key code
-
getChar
public final String getChar()
Returns the character element of this key code, which is simply a mapping of the underlying platform code returned bygetCode()
.- Returns:
- the character element of this key code
- Since:
- 9
-
getCode
public final int getCode()
Returns the underlying platform code used to represent thecharacter
in the key code.- Returns:
- the underlying platform code used to represent the
character
in the key code - Since:
- 9
-
-