Enum Class KeyCode

java.lang.Object
java.lang.Enum<KeyCode>
javafx.scene.input.KeyCode
All Implemented Interfaces:
Serializable, Comparable<KeyCode>, Constable

public enum KeyCode extends Enum<KeyCode>
Set of key codes for KeyEvent objects.
Since:
JavaFX 2.0
  • Nested Class Summary Link icon

    Nested classes/interfaces declared in class java.lang.Enum Link icon

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary Link icon

    Enum Constants
    Enum Constant
    Description
    Constant for the A key.
    Constant for the Accept or Commit function key.
    Constant for the Add key.
    Constant for the Again key.
    Constant for the All Candidates function key.
    Constant for the Alphanumeric function key.
    Constant for the Alt key.
    Constant for the AltGraph function key.
    Constant for the Ampersand key.
    Constant for the Asterisk key.
    Constant for the "@" key.
    Constant for the B key.
    Constant for the Back Quote key.
    Constant for the back slash key, "\"
    Constant for the Backspace key.
    Constant for the Begin key.
    Constant for the Left Brace key.
    Constant for the Right Brace key.
    Constant for the C key.
    Constant for the Cancel key.
    Constant for the Caps Lock key.
    Constant for the Channel Down key.
    Constant for the Channel Up key.
    Constant for the "^" key.
    Constant for the Clear key.
    Constant for the close bracket key, "]"
    Constant for the Code Input function key.
    Constant for the ":" key.
    Constant for the Colored Key 0 key.
    Constant for the Colored Key 1 key.
    Constant for the Colored Key 2 key.
    Constant for the Colored Key 3 key.
    Constant for the comma key, ","
    Constant for the Apple Command key.
    Constant for the input method on/off key.
    Constant for the Microsoft Windows Context Menu key.
    Constant for the Ctrl key.
    Constant for the Convert function key.
    Constant for the Copy key.
    Constant for the Cut key.
    Constant for the D key.
    Constant for the Dead Abovedot key.
    Constant for the Dead Abovering key.
    Constant for the Dead Acute key.
    Constant for the Dead Breve key.
    Constant for the Dead Caron key.
    Constant for the Dead Cedilla key.
    Constant for the Dead Circumflex key.
    Constant for the Dead Diaeresis key.
    Constant for the Dead Doubleacute key.
    Constant for the Dead Grave key.
    Constant for the Dead Iota key.
    Constant for the Dead Macron key.
    Constant for the Dead Ogonek key.
    Constant for the Dead Semivoiced Sound key.
    Constant for the Dead Tilde key.
    Constant for the Dead Voiced Sound key.
    Constant for the Decimal key.
    Constant for the Delete key.
    Constant for the 0 key.
    Constant for the 1 key.
    Constant for the 2 key.
    Constant for the 3 key.
    Constant for the 4 key.
    Constant for the 5 key.
    Constant for the 6 key.
    Constant for the 7 key.
    Constant for the 8 key.
    Constant for the 9 key.
    Constant for the Divide key.
    Constant for the "$" key.
    Constant for the non-numpad down arrow key.
    Constant for the E key.
    Constant for the Eject key.
    Constant for the End key.
    Constant for the Enter key.
    Constant for the equals key, "="
    Constant for the Esc key.
    Constant for the Euro currency sign key.
    Constant for the "!" key.
    Constant for the F key.
    Constant for the F1 function key.
    Constant for the F10 function key.
    Constant for the F11 function key.
    Constant for the F12 function key.
    Constant for the F13 function key.
    Constant for the F14 function key.
    Constant for the F15 function key.
    Constant for the F16 function key.
    Constant for the F17 function key.
    Constant for the F18 function key.
    Constant for the F19 function key.
    Constant for the F2 function key.
    Constant for the F20 function key.
    Constant for the F21 function key.
    Constant for the F22 function key.
    Constant for the F23 function key.
    Constant for the F24 function key.
    Constant for the F3 function key.
    Constant for the F4 function key.
    Constant for the F5 function key.
    Constant for the F6 function key.
    Constant for the F7 function key.
    Constant for the F8 function key.
    Constant for the F9 function key.
    Constant for the Fast Forward key.
    Constant for input method support on Asian Keyboards.
    Constant for the Find key.
    Constant for the Full-Width Characters function key.
    Constant for the G key.
    Constant for the Game A key.
    Constant for the Game B key.
    Constant for the Game C key.
    Constant for the Game D key.
    Constant for the Greater key.
    Constant for the H key.
    Constant for the Half-Width Characters function key.
    Constant for the Help key.
    Constant for the Hiragana function key.
    Constant for the Home key.
    Constant for the I key.
    Constant for the Info key.
    Constant for the input method on/off key.
    Constant for the Insert key.
    Constant for the inverted exclamation mark key.
    Constant for the J key.
    Constant for the Japanese-Hiragana function key.
    Constant for the Japanese-Katakana function key.
    Constant for the Japanese-Roman function key.
    Constant for the K key.
    Constant for the Kana key.
    Constant for the locking Kana function key.
    Constant for the Kanji key.
    Constant for the Katakana function key.
    Constant for the numeric keypad down arrow key.
    Constant for the numeric keypad left arrow key.
    Constant for the numeric keypad right arrow key.
    Constant for the numeric keypad up arrow key.
    Constant for the L key.
    Constant for the non-numpad left arrow key.
    Constant for the "(" key.
    Constant for the Less key.
    Constant for the M key.
    Constant for the Meta key.
    Constant for the minus key, "-"
    Constant for the Mode Change key.
    Constant for the Multiply key.
    Constant for the Mute key.
    Constant for the N key.
    Constant for the Don't Convert function key.
    Constant for the Num Lock key.
    Constant for the "#" key.
    Constant for the Numpad 0 key.
    Constant for the Numpad 1 key.
    Constant for the Numpad 2 key.
    Constant for the Numpad 3 key.
    Constant for the Numpad 4 key.
    Constant for the Numpad 5 key.
    Constant for the Numpad 6 key.
    Constant for the Numpad 7 key.
    Constant for the Numpad 8 key.
    Constant for the Numpad 9 key.
    Constant for the O key.
    Constant for the open bracket key, "["
    Constant for the P key.
    Constant for the Page Down key.
    Constant for the Page Up key.
    Constant for the Paste key.
    Constant for the Pause key.
    Constant for the period key, "."
    Constant for the Play key.
    Constant for the "+" key.
    Constant for the Pound key.
    Constant for the Power key.
    Constant for the Previous Candidate function key.
    Constant for the Print Screen key.
    Constant for the Properties key.
    Constant for the Q key.
    Constant for the Quote key.
    Constant for the Double Quote key.
    Constant for the R key.
    Constant for the Record key.
    Constant for the Rewind key.
    Constant for the non-numpad right arrow key.
    Constant for the ")" key.
    Constant for the Roman Characters function key.
    Constant for the S key.
    Constant for the Scroll Lock key.
    Constant for the semicolon key, ";"
    Constant for the Numpad Separator key.
    Constant for the Shift key.
    Constant for the Shortcut key.
    Constant for the forward slash key, "/"
    Constant for the Softkey 0 key.
    Constant for the Softkey 1 key.
    Constant for the Softkey 2 key.
    Constant for the Softkey 3 key.
    Constant for the Softkey 4 key.
    Constant for the Softkey 5 key.
    Constant for the Softkey 6 key.
    Constant for the Softkey 7 key.
    Constant for the Softkey 8 key.
    Constant for the Softkey 9 key.
    Constant for the Space key.
    Constant for the Star key.
    Constant for the Stop key.
    Constant for the Subtract key.
    Constant for the T key.
    Constant for the Tab key.
    Constant for the Next Track key.
    Constant for the Previous Track key.
    Constant for the U key.
    This value is used to indicate that the keyCode is unknown.
    Constant for the "_" key.
    Constant for the Undo key.
    Constant for the non-numpad up arrow key.
    Constant for the V key.
    Constant for the Volume Down key.
    Constant for the Volume Up key.
    Constant for the W key.
    Constant for the Microsoft Windows "Windows" key.
    Constant for the X key.
    Constant for the Y key.
    Constant for the Z key.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    final String
    Returns the character element of this key code, which is simply a mapping of the underlying platform code returned by getCode().
    final int
    Returns the underlying platform code used to represent the character in the key code.
    static KeyCode
    Parses textual representation of a key.
    final String
    Gets name of this key code.
    final boolean
    Left, right, up, down keys (including the keypad arrows)
    final boolean
    All Digit keys (including the keypad digits)
    final boolean
    Function keys like F1, F2, etc...
    final boolean
    All keys on the keypad
    final boolean
    All keys with letters
    final boolean
    All multimedia keys (channel up/down, volume control, etc...)
    final boolean
    Keys that could act as a modifier
    final boolean
    Navigation keys are arrow keys and Page Down, Page Up, Home, End (including keypad keys)
    final boolean
    Space, tab and enter
    static KeyCode
    Returns the enum constant of this class with the specified name.
    static KeyCode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods declared in class java.lang.Object Link icon

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details Link icon

    • ENTER Link icon

      public static final KeyCode ENTER
      Constant for the Enter key.
    • BACK_SPACE Link icon

      public static final KeyCode BACK_SPACE
      Constant for the Backspace key.
    • TAB Link icon

      public static final KeyCode TAB
      Constant for the Tab key.
    • CANCEL Link icon

      public static final KeyCode CANCEL
      Constant for the Cancel key.
    • CLEAR Link icon

      public static final KeyCode CLEAR
      Constant for the Clear key.
    • SHIFT Link icon

      public static final KeyCode SHIFT
      Constant for the Shift key.
    • CONTROL Link icon

      public static final KeyCode CONTROL
      Constant for the Ctrl key.
    • ALT Link icon

      public static final KeyCode ALT
      Constant for the Alt key.
    • PAUSE Link icon

      public static final KeyCode PAUSE
      Constant for the Pause key.
    • CAPS Link icon

      public static final KeyCode CAPS
      Constant for the Caps Lock key.
    • ESCAPE Link icon

      public static final KeyCode ESCAPE
      Constant for the Esc key.
    • SPACE Link icon

      public static final KeyCode SPACE
      Constant for the Space key.
    • PAGE_UP Link icon

      public static final KeyCode PAGE_UP
      Constant for the Page Up key.
    • PAGE_DOWN Link icon

      public static final KeyCode PAGE_DOWN
      Constant for the Page Down key.
    • END Link icon

      public static final KeyCode END
      Constant for the End key.
    • HOME Link icon

      public static final KeyCode HOME
      Constant for the Home key.
    • LEFT Link icon

      public static final KeyCode LEFT
      Constant for the non-numpad left arrow key.
    • UP Link icon

      public static final KeyCode UP
      Constant for the non-numpad up arrow key.
    • DOWN Link icon

      public static final KeyCode DOWN
      Constant for the non-numpad down arrow key.
    • COMMA Link icon

      public static final KeyCode COMMA
      Constant for the comma key, ","
    • MINUS Link icon

      public static final KeyCode MINUS
      Constant for the minus key, "-"
    • PERIOD Link icon

      public static final KeyCode PERIOD
      Constant for the period key, "."
    • SLASH Link icon

      public static final KeyCode SLASH
      Constant for the forward slash key, "/"
    • DIGIT0 Link icon

      public static final KeyCode DIGIT0
      Constant for the 0 key.
    • DIGIT1 Link icon

      public static final KeyCode DIGIT1
      Constant for the 1 key.
    • DIGIT2 Link icon

      public static final KeyCode DIGIT2
      Constant for the 2 key.
    • DIGIT3 Link icon

      public static final KeyCode DIGIT3
      Constant for the 3 key.
    • DIGIT4 Link icon

      public static final KeyCode DIGIT4
      Constant for the 4 key.
    • DIGIT5 Link icon

      public static final KeyCode DIGIT5
      Constant for the 5 key.
    • DIGIT6 Link icon

      public static final KeyCode DIGIT6
      Constant for the 6 key.
    • DIGIT7 Link icon

      public static final KeyCode DIGIT7
      Constant for the 7 key.
    • DIGIT8 Link icon

      public static final KeyCode DIGIT8
      Constant for the 8 key.
    • DIGIT9 Link icon

      public static final KeyCode DIGIT9
      Constant for the 9 key.
    • SEMICOLON Link icon

      public static final KeyCode SEMICOLON
      Constant for the semicolon key, ";"
    • EQUALS Link icon

      public static final KeyCode EQUALS
      Constant for the equals key, "="
    • A Link icon

      public static final KeyCode A
      Constant for the A key.
    • B Link icon

      public static final KeyCode B
      Constant for the B key.
    • C Link icon

      public static final KeyCode C
      Constant for the C key.
    • D Link icon

      public static final KeyCode D
      Constant for the D key.
    • E Link icon

      public static final KeyCode E
      Constant for the E key.
    • F Link icon

      public static final KeyCode F
      Constant for the F key.
    • G Link icon

      public static final KeyCode G
      Constant for the G key.
    • H Link icon

      public static final KeyCode H
      Constant for the H key.
    • I Link icon

      public static final KeyCode I
      Constant for the I key.
    • J Link icon

      public static final KeyCode J
      Constant for the J key.
    • K Link icon

      public static final KeyCode K
      Constant for the K key.
    • L Link icon

      public static final KeyCode L
      Constant for the L key.
    • M Link icon

      public static final KeyCode M
      Constant for the M key.
    • N Link icon

      public static final KeyCode N
      Constant for the N key.
    • O Link icon

      public static final KeyCode O
      Constant for the O key.
    • P Link icon

      public static final KeyCode P
      Constant for the P key.
    • Q Link icon

      public static final KeyCode Q
      Constant for the Q key.
    • R Link icon

      public static final KeyCode R
      Constant for the R key.
    • S Link icon

      public static final KeyCode S
      Constant for the S key.
    • T Link icon

      public static final KeyCode T
      Constant for the T key.
    • U Link icon

      public static final KeyCode U
      Constant for the U key.
    • V Link icon

      public static final KeyCode V
      Constant for the V key.
    • W Link icon

      public static final KeyCode W
      Constant for the W key.
    • X Link icon

      public static final KeyCode X
      Constant for the X key.
    • Y Link icon

      public static final KeyCode Y
      Constant for the Y key.
    • Z Link icon

      public static final KeyCode Z
      Constant for the Z key.
    • OPEN_BRACKET Link icon

      public static final KeyCode OPEN_BRACKET
      Constant for the open bracket key, "["
    • BACK_SLASH Link icon

      public static final KeyCode BACK_SLASH
      Constant for the back slash key, "\"
    • CLOSE_BRACKET Link icon

      public static final KeyCode CLOSE_BRACKET
      Constant for the close bracket key, "]"
    • NUMPAD0 Link icon

      public static final KeyCode NUMPAD0
      Constant for the Numpad 0 key.
    • NUMPAD1 Link icon

      public static final KeyCode NUMPAD1
      Constant for the Numpad 1 key.
    • NUMPAD2 Link icon

      public static final KeyCode NUMPAD2
      Constant for the Numpad 2 key.
    • NUMPAD3 Link icon

      public static final KeyCode NUMPAD3
      Constant for the Numpad 3 key.
    • NUMPAD4 Link icon

      public static final KeyCode NUMPAD4
      Constant for the Numpad 4 key.
    • NUMPAD5 Link icon

      public static final KeyCode NUMPAD5
      Constant for the Numpad 5 key.
    • NUMPAD6 Link icon

      public static final KeyCode NUMPAD6
      Constant for the Numpad 6 key.
    • NUMPAD7 Link icon

      public static final KeyCode NUMPAD7
      Constant for the Numpad 7 key.
    • NUMPAD8 Link icon

      public static final KeyCode NUMPAD8
      Constant for the Numpad 8 key.
    • NUMPAD9 Link icon

      public static final KeyCode NUMPAD9
      Constant for the Numpad 9 key.
    • MULTIPLY Link icon

      public static final KeyCode MULTIPLY
      Constant for the Multiply key.
    • ADD Link icon

      public static final KeyCode ADD
      Constant for the Add key.
    • SEPARATOR Link icon

      public static final KeyCode SEPARATOR
      Constant for the Numpad Separator key.
    • SUBTRACT Link icon

      public static final KeyCode SUBTRACT
      Constant for the Subtract key.
    • DECIMAL Link icon

      public static final KeyCode DECIMAL
      Constant for the Decimal key.
    • DIVIDE Link icon

      public static final KeyCode DIVIDE
      Constant for the Divide key.
    • DELETE Link icon

      public static final KeyCode DELETE
      Constant for the Delete key.
    • NUM_LOCK Link icon

      public static final KeyCode NUM_LOCK
      Constant for the Num Lock key.
    • SCROLL_LOCK Link icon

      public static final KeyCode SCROLL_LOCK
      Constant for the Scroll Lock key.
    • F1 Link icon

      public static final KeyCode F1
      Constant for the F1 function key.
    • F2 Link icon

      public static final KeyCode F2
      Constant for the F2 function key.
    • F3 Link icon

      public static final KeyCode F3
      Constant for the F3 function key.
    • F4 Link icon

      public static final KeyCode F4
      Constant for the F4 function key.
    • F5 Link icon

      public static final KeyCode F5
      Constant for the F5 function key.
    • F6 Link icon

      public static final KeyCode F6
      Constant for the F6 function key.
    • F7 Link icon

      public static final KeyCode F7
      Constant for the F7 function key.
    • F8 Link icon

      public static final KeyCode F8
      Constant for the F8 function key.
    • F9 Link icon

      public static final KeyCode F9
      Constant for the F9 function key.
    • F10 Link icon

      public static final KeyCode F10
      Constant for the F10 function key.
    • F11 Link icon

      public static final KeyCode F11
      Constant for the F11 function key.
    • F12 Link icon

      public static final KeyCode F12
      Constant for the F12 function key.
    • F13 Link icon

      public static final KeyCode F13
      Constant for the F13 function key.
    • F14 Link icon

      public static final KeyCode F14
      Constant for the F14 function key.
    • F15 Link icon

      public static final KeyCode F15
      Constant for the F15 function key.
    • F16 Link icon

      public static final KeyCode F16
      Constant for the F16 function key.
    • F17 Link icon

      public static final KeyCode F17
      Constant for the F17 function key.
    • F18 Link icon

      public static final KeyCode F18
      Constant for the F18 function key.
    • F19 Link icon

      public static final KeyCode F19
      Constant for the F19 function key.
    • F20 Link icon

      public static final KeyCode F20
      Constant for the F20 function key.
    • F21 Link icon

      public static final KeyCode F21
      Constant for the F21 function key.
    • F22 Link icon

      public static final KeyCode F22
      Constant for the F22 function key.
    • F23 Link icon

      public static final KeyCode F23
      Constant for the F23 function key.
    • F24 Link icon

      public static final KeyCode F24
      Constant for the F24 function key.
    • PRINTSCREEN Link icon

      public static final KeyCode PRINTSCREEN
      Constant for the Print Screen key.
    • INSERT Link icon

      public static final KeyCode INSERT
      Constant for the Insert key.
    • HELP Link icon

      public static final KeyCode HELP
      Constant for the Help key.
    • META Link icon

      public static final KeyCode META
      Constant for the Meta key.
    • BACK_QUOTE Link icon

      public static final KeyCode BACK_QUOTE
      Constant for the Back Quote key.
    • QUOTE Link icon

      public static final KeyCode QUOTE
      Constant for the Quote key.
    • KP_UP Link icon

      public static final KeyCode KP_UP
      Constant for the numeric keypad up arrow key.
    • KP_DOWN Link icon

      public static final KeyCode KP_DOWN
      Constant for the numeric keypad down arrow key.
    • KP_LEFT Link icon

      public static final KeyCode KP_LEFT
      Constant for the numeric keypad left arrow key.
    • KP_RIGHT Link icon

      public static final KeyCode KP_RIGHT
      Constant for the numeric keypad right arrow key.
    • DEAD_GRAVE Link icon

      public static final KeyCode DEAD_GRAVE
      Constant for the Dead Grave key.
    • DEAD_ACUTE Link icon

      public static final KeyCode DEAD_ACUTE
      Constant for the Dead Acute key.
    • DEAD_CIRCUMFLEX Link icon

      public static final KeyCode DEAD_CIRCUMFLEX
      Constant for the Dead Circumflex key.
    • DEAD_TILDE Link icon

      public static final KeyCode DEAD_TILDE
      Constant for the Dead Tilde key.
    • DEAD_MACRON Link icon

      public static final KeyCode DEAD_MACRON
      Constant for the Dead Macron key.
    • DEAD_BREVE Link icon

      public static final KeyCode DEAD_BREVE
      Constant for the Dead Breve key.
    • DEAD_ABOVEDOT Link icon

      public static final KeyCode DEAD_ABOVEDOT
      Constant for the Dead Abovedot key.
    • DEAD_DIAERESIS Link icon

      public static final KeyCode DEAD_DIAERESIS
      Constant for the Dead Diaeresis key.
    • DEAD_ABOVERING Link icon

      public static final KeyCode DEAD_ABOVERING
      Constant for the Dead Abovering key.
    • DEAD_DOUBLEACUTE Link icon

      public static final KeyCode DEAD_DOUBLEACUTE
      Constant for the Dead Doubleacute key.
    • DEAD_CARON Link icon

      public static final KeyCode DEAD_CARON
      Constant for the Dead Caron key.
    • DEAD_CEDILLA Link icon

      public static final KeyCode DEAD_CEDILLA
      Constant for the Dead Cedilla key.
    • DEAD_OGONEK Link icon

      public static final KeyCode DEAD_OGONEK
      Constant for the Dead Ogonek key.
    • DEAD_IOTA Link icon

      public static final KeyCode DEAD_IOTA
      Constant for the Dead Iota key.
    • DEAD_VOICED_SOUND Link icon

      public static final KeyCode DEAD_VOICED_SOUND
      Constant for the Dead Voiced Sound key.
    • DEAD_SEMIVOICED_SOUND Link icon

      public static final KeyCode DEAD_SEMIVOICED_SOUND
      Constant for the Dead Semivoiced Sound key.
    • AMPERSAND Link icon

      public static final KeyCode AMPERSAND
      Constant for the Ampersand key.
    • ASTERISK Link icon

      public static final KeyCode ASTERISK
      Constant for the Asterisk key.
    • QUOTEDBL Link icon

      public static final KeyCode QUOTEDBL
      Constant for the Double Quote key.
    • LESS Link icon

      public static final KeyCode LESS
      Constant for the Less key.
    • GREATER Link icon

      public static final KeyCode GREATER
      Constant for the Greater key.
    • BRACELEFT Link icon

      public static final KeyCode BRACELEFT
      Constant for the Left Brace key.
    • BRACERIGHT Link icon

      public static final KeyCode BRACERIGHT
      Constant for the Right Brace key.
    • AT Link icon

      public static final KeyCode AT
      Constant for the "@" key.
    • COLON Link icon

      public static final KeyCode COLON
      Constant for the ":" key.
    • CIRCUMFLEX Link icon

      public static final KeyCode CIRCUMFLEX
      Constant for the "^" key.
    • DOLLAR Link icon

      public static final KeyCode DOLLAR
      Constant for the "$" key.
    • EURO_SIGN Link icon

      public static final KeyCode EURO_SIGN
      Constant for the Euro currency sign key.
    • EXCLAMATION_MARK Link icon

      public static final KeyCode EXCLAMATION_MARK
      Constant for the "!" key.
    • INVERTED_EXCLAMATION_MARK Link icon

      public static final KeyCode INVERTED_EXCLAMATION_MARK
      Constant for the inverted exclamation mark key.
    • LEFT_PARENTHESIS Link icon

      public static final KeyCode LEFT_PARENTHESIS
      Constant for the "(" key.
    • NUMBER_SIGN Link icon

      public static final KeyCode NUMBER_SIGN
      Constant for the "#" key.
    • PLUS Link icon

      public static final KeyCode PLUS
      Constant for the "+" key.
    • RIGHT_PARENTHESIS Link icon

      public static final KeyCode RIGHT_PARENTHESIS
      Constant for the ")" key.
    • UNDERSCORE Link icon

      public static final KeyCode UNDERSCORE
      Constant for the "_" key.
    • WINDOWS Link icon

      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 Link icon

      public static final KeyCode CONTEXT_MENU
      Constant for the Microsoft Windows Context Menu key.
    • FINAL Link icon

      public static final KeyCode FINAL
      Constant for input method support on Asian Keyboards.
    • CONVERT Link icon

      public static final KeyCode CONVERT
      Constant for the Convert function key.
    • NONCONVERT Link icon

      public static final KeyCode NONCONVERT
      Constant for the Don't Convert function key.
    • ACCEPT Link icon

      public static final KeyCode ACCEPT
      Constant for the Accept or Commit function key.
    • MODECHANGE Link icon

      public static final KeyCode MODECHANGE
      Constant for the Mode Change key.
    • KANA Link icon

      public static final KeyCode KANA
      Constant for the Kana key.
    • KANJI Link icon

      public static final KeyCode KANJI
      Constant for the Kanji key.
    • ALPHANUMERIC Link icon

      public static final KeyCode ALPHANUMERIC
      Constant for the Alphanumeric function key.
    • KATAKANA Link icon

      public static final KeyCode KATAKANA
      Constant for the Katakana function key.
    • HIRAGANA Link icon

      public static final KeyCode HIRAGANA
      Constant for the Hiragana function key.
    • FULL_WIDTH Link icon

      public static final KeyCode FULL_WIDTH
      Constant for the Full-Width Characters function key.
    • HALF_WIDTH Link icon

      public static final KeyCode HALF_WIDTH
      Constant for the Half-Width Characters function key.
    • ROMAN_CHARACTERS Link icon

      public static final KeyCode ROMAN_CHARACTERS
      Constant for the Roman Characters function key.
    • ALL_CANDIDATES Link icon

      public static final KeyCode ALL_CANDIDATES
      Constant for the All Candidates function key.
    • PREVIOUS_CANDIDATE Link icon

      public static final KeyCode PREVIOUS_CANDIDATE
      Constant for the Previous Candidate function key.
    • CODE_INPUT Link icon

      public static final KeyCode CODE_INPUT
      Constant for the Code Input function key.
    • JAPANESE_KATAKANA Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      public static final KeyCode INPUT_METHOD_ON_OFF
      Constant for the input method on/off key.
    • CUT Link icon

      public static final KeyCode CUT
      Constant for the Cut key.
    • COPY Link icon

      public static final KeyCode COPY
      Constant for the Copy key.
    • PASTE Link icon

      public static final KeyCode PASTE
      Constant for the Paste key.
    • UNDO Link icon

      public static final KeyCode UNDO
      Constant for the Undo key.
    • AGAIN Link icon

      public static final KeyCode AGAIN
      Constant for the Again key.
    • FIND Link icon

      public static final KeyCode FIND
      Constant for the Find key.
    • PROPS Link icon

      public static final KeyCode PROPS
      Constant for the Properties key.
    • STOP Link icon

      public static final KeyCode STOP
      Constant for the Stop key.
    • COMPOSE Link icon

      public static final KeyCode COMPOSE
      Constant for the input method on/off key.
    • ALT_GRAPH Link icon

      public static final KeyCode ALT_GRAPH
      Constant for the AltGraph function key.
    • BEGIN Link icon

      public static final KeyCode BEGIN
      Constant for the Begin key.
    • UNDEFINED Link icon

      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 Link icon

      public static final KeyCode SOFTKEY_0
      Constant for the Softkey 0 key.
    • SOFTKEY_1 Link icon

      public static final KeyCode SOFTKEY_1
      Constant for the Softkey 1 key.
    • SOFTKEY_2 Link icon

      public static final KeyCode SOFTKEY_2
      Constant for the Softkey 2 key.
    • SOFTKEY_3 Link icon

      public static final KeyCode SOFTKEY_3
      Constant for the Softkey 3 key.
    • SOFTKEY_4 Link icon

      public static final KeyCode SOFTKEY_4
      Constant for the Softkey 4 key.
    • SOFTKEY_5 Link icon

      public static final KeyCode SOFTKEY_5
      Constant for the Softkey 5 key.
    • SOFTKEY_6 Link icon

      public static final KeyCode SOFTKEY_6
      Constant for the Softkey 6 key.
    • SOFTKEY_7 Link icon

      public static final KeyCode SOFTKEY_7
      Constant for the Softkey 7 key.
    • SOFTKEY_8 Link icon

      public static final KeyCode SOFTKEY_8
      Constant for the Softkey 8 key.
    • SOFTKEY_9 Link icon

      public static final KeyCode SOFTKEY_9
      Constant for the Softkey 9 key.
    • GAME_A Link icon

      public static final KeyCode GAME_A
      Constant for the Game A key.
    • GAME_B Link icon

      public static final KeyCode GAME_B
      Constant for the Game B key.
    • GAME_C Link icon

      public static final KeyCode GAME_C
      Constant for the Game C key.
    • GAME_D Link icon

      public static final KeyCode GAME_D
      Constant for the Game D key.
    • STAR Link icon

      public static final KeyCode STAR
      Constant for the Star key.
    • POUND Link icon

      public static final KeyCode POUND
      Constant for the Pound key.
    • POWER Link icon

      public static final KeyCode POWER
      Constant for the Power key.
    • INFO Link icon

      public static final KeyCode INFO
      Constant for the Info key.
    • COLORED_KEY_0 Link icon

      public static final KeyCode COLORED_KEY_0
      Constant for the Colored Key 0 key.
    • COLORED_KEY_1 Link icon

      public static final KeyCode COLORED_KEY_1
      Constant for the Colored Key 1 key.
    • COLORED_KEY_2 Link icon

      public static final KeyCode COLORED_KEY_2
      Constant for the Colored Key 2 key.
    • COLORED_KEY_3 Link icon

      public static final KeyCode COLORED_KEY_3
      Constant for the Colored Key 3 key.
    • EJECT_TOGGLE Link icon

      public static final KeyCode EJECT_TOGGLE
      Constant for the Eject key.
    • PLAY Link icon

      public static final KeyCode PLAY
      Constant for the Play key.
    • RECORD Link icon

      public static final KeyCode RECORD
      Constant for the Record key.
    • FAST_FWD Link icon

      public static final KeyCode FAST_FWD
      Constant for the Fast Forward key.
    • REWIND Link icon

      public static final KeyCode REWIND
      Constant for the Rewind key.
    • TRACK_PREV Link icon

      public static final KeyCode TRACK_PREV
      Constant for the Previous Track key.
    • TRACK_NEXT Link icon

      public static final KeyCode TRACK_NEXT
      Constant for the Next Track key.
    • CHANNEL_UP Link icon

      public static final KeyCode CHANNEL_UP
      Constant for the Channel Up key.
    • CHANNEL_DOWN Link icon

      public static final KeyCode CHANNEL_DOWN
      Constant for the Channel Down key.
    • VOLUME_UP Link icon

      public static final KeyCode VOLUME_UP
      Constant for the Volume Up key.
    • VOLUME_DOWN Link icon

      public static final KeyCode VOLUME_DOWN
      Constant for the Volume Down key.
    • MUTE Link icon

      public static final KeyCode MUTE
      Constant for the Mute key.
    • COMMAND Link icon

      public static final KeyCode COMMAND
      Constant for the Apple Command key.
      Since:
      JavaFX 2.1
    • SHORTCUT Link icon

      public static final KeyCode SHORTCUT
      Constant for the Shortcut key.
  • Method Details Link icon

    • values Link icon

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

      public static KeyCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • isFunctionKey Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      public final boolean isLetterKey()
      All keys with letters
      Returns:
      true if this key code corresponds to a letter key
      Since:
      JavaFX 2.2
    • isDigitKey Link icon

      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 Link icon

      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 Link icon

      public final boolean isWhitespaceKey()
      Space, tab and enter
      Returns:
      true if this key code corresponds to a whitespace key
      Since:
      JavaFX 2.2
    • isMediaKey Link icon

      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 Link icon

      public final String getName()
      Gets name of this key code.
      Returns:
      Name of this key code
    • getChar Link icon

      public final String getChar()
      Returns the character element of this key code, which is simply a mapping of the underlying platform code returned by getCode().
      Returns:
      the character element of this key code
      Since:
      9
    • getCode Link icon

      public final int getCode()
      Returns the underlying platform code used to represent the character in the key code.
      Returns:
      the underlying platform code used to represent the character in the key code
      Since:
      9
    • getKeyCode Link icon

      public static KeyCode getKeyCode(String name)
      Parses textual representation of a key.
      Parameters:
      name - Textual representation of the key
      Returns:
      KeyCode for the key with the given name, null if the string is unknown