public enum KeyCode extends Enum<KeyCode>
KeyEvent objects.| Enum Constant and Description | 
|---|
| AConstant for the  Akey. | 
| ACCEPTConstant for the Accept or Commit function key. | 
| ADDConstant for the  Addkey. | 
| AGAINConstant for the  Againkey. | 
| ALL_CANDIDATESConstant for the All Candidates function key. | 
| ALPHANUMERICConstant for the Alphanumeric function key. | 
| ALTConstant for the  Altkey. | 
| ALT_GRAPHConstant for the AltGraph function key. | 
| AMPERSANDConstant for the  Ampersandkey. | 
| ASTERISKConstant for the  Asteriskkey. | 
| ATConstant for the "@" key. | 
| BConstant for the  Bkey. | 
| BACK_QUOTEConstant for the  Back Quotekey. | 
| BACK_SLASHConstant for the back slash key, "\" | 
| BACK_SPACEConstant for the  Backspacekey. | 
| BEGINConstant for the Begin key. | 
| BRACELEFTConstant for the  Left Bracekey. | 
| BRACERIGHTConstant for the  Right Bracekey. | 
| CConstant for the  Ckey. | 
| CANCELConstant for the  Cancelkey. | 
| CAPSConstant for the  Caps Lockkey. | 
| CHANNEL_DOWNConstant for the  Channel Downkey. | 
| CHANNEL_UPConstant for the  Channel Upkey. | 
| CIRCUMFLEXConstant for the "^" key. | 
| CLEARConstant for the  Clearkey. | 
| CLOSE_BRACKETConstant for the close bracket key, "]" | 
| CODE_INPUTConstant for the Code Input function key. | 
| COLONConstant for the ":" key. | 
| COLORED_KEY_0Constant for the  Colored Key 0key. | 
| COLORED_KEY_1Constant for the  Colored Key 1key. | 
| COLORED_KEY_2Constant for the  Colored Key 2key. | 
| COLORED_KEY_3Constant for the  Colored Key 3key. | 
| COMMAConstant for the comma key, "," | 
| COMMANDConstant for the Apple  Commandkey. | 
| COMPOSEConstant for the input method on/off key. | 
| CONTEXT_MENUConstant for the Microsoft Windows Context Menu key. | 
| CONTROLConstant for the  Ctrlkey. | 
| CONVERTConstant for the Convert function key. | 
| COPYConstant for the  Copykey. | 
| CUTConstant for the  Cutkey. | 
| DConstant for the  Dkey. | 
| DEAD_ABOVEDOTConstant for the  Dead Abovedotkey. | 
| DEAD_ABOVERINGConstant for the  Dead Aboveringkey. | 
| DEAD_ACUTEConstant for the  Dead Acutekey. | 
| DEAD_BREVEConstant for the  Dead Brevekey. | 
| DEAD_CARONConstant for the  Dead Caronkey. | 
| DEAD_CEDILLAConstant for the  Dead Cedillakey. | 
| DEAD_CIRCUMFLEXConstant for the  Dead Circumflexkey. | 
| DEAD_DIAERESISConstant for the  Dead Diaeresiskey. | 
| DEAD_DOUBLEACUTEConstant for the  Dead Doubleacutekey. | 
| DEAD_GRAVEConstant for the  Dead Gravekey. | 
| DEAD_IOTAConstant for the  Dead Iotakey. | 
| DEAD_MACRONConstant for the  Dead Macronkey. | 
| DEAD_OGONEKConstant for the  Dead Ogonekkey. | 
| DEAD_SEMIVOICED_SOUNDConstant for the  Dead Semivoiced Soundkey. | 
| DEAD_TILDEConstant for the  Dead Tildekey. | 
| DEAD_VOICED_SOUNDConstant for the  Dead Voiced Soundkey. | 
| DECIMALConstant for the  Decimalkey. | 
| DELETEConstant for the  Deletekey. | 
| DIGIT0Constant for the  0key. | 
| DIGIT1Constant for the  1key. | 
| DIGIT2Constant for the  2key. | 
| DIGIT3Constant for the  3key. | 
| DIGIT4Constant for the  4key. | 
| DIGIT5Constant for the  5key. | 
| DIGIT6Constant for the  6key. | 
| DIGIT7Constant for the  7key. | 
| DIGIT8Constant for the  8key. | 
| DIGIT9Constant for the  9key. | 
| DIVIDEConstant for the  Dividekey. | 
| DOLLARConstant for the "$" key. | 
| DOWNConstant for the non-numpad down arrow key. | 
| EConstant for the  Ekey. | 
| EJECT_TOGGLEConstant for the  Ejectkey. | 
| ENDConstant for the  Endkey. | 
| ENTERConstant for the  Enterkey. | 
| EQUALSConstant for the equals key, "=" | 
| ESCAPEConstant for the  Esckey. | 
| EURO_SIGNConstant for the Euro currency sign key. | 
| EXCLAMATION_MARKConstant for the "!" key. | 
| FConstant for the  Fkey. | 
| F1Constant for the F1 function key. | 
| F10Constant for the F10 function key. | 
| F11Constant for the F11 function key. | 
| F12Constant for the F12 function key. | 
| F13Constant for the F13 function key. | 
| F14Constant for the F14 function key. | 
| F15Constant for the F15 function key. | 
| F16Constant for the F16 function key. | 
| F17Constant for the F17 function key. | 
| F18Constant for the F18 function key. | 
| F19Constant for the F19 function key. | 
| F2Constant for the F2 function key. | 
| F20Constant for the F20 function key. | 
| F21Constant for the F21 function key. | 
| F22Constant for the F22 function key. | 
| F23Constant for the F23 function key. | 
| F24Constant for the F24 function key. | 
| F3Constant for the F3 function key. | 
| F4Constant for the F4 function key. | 
| F5Constant for the F5 function key. | 
| F6Constant for the F6 function key. | 
| F7Constant for the F7 function key. | 
| F8Constant for the F8 function key. | 
| F9Constant for the F9 function key. | 
| FAST_FWDConstant for the  Fast Forwardkey. | 
| FINALConstant for input method support on Asian Keyboards. | 
| FINDConstant for the  Findkey. | 
| FULL_WIDTHConstant for the Full-Width Characters function key. | 
| GConstant for the  Gkey. | 
| GAME_AConstant for the  Game Akey. | 
| GAME_BConstant for the  Game Bkey. | 
| GAME_CConstant for the  Game Ckey. | 
| GAME_DConstant for the  Game Dkey. | 
| GREATERConstant for the  Greaterkey. | 
| HConstant for the  Hkey. | 
| HALF_WIDTHConstant for the Half-Width Characters function key. | 
| HELPConstant for the  Helpkey. | 
| HIRAGANAConstant for the Hiragana function key. | 
| HOMEConstant for the  Homekey. | 
| IConstant for the  Ikey. | 
| INFOConstant for the  Infokey. | 
| INPUT_METHOD_ON_OFFConstant for the input method on/off key. | 
| INSERTConstant for the  Insertkey. | 
| INVERTED_EXCLAMATION_MARKConstant for the inverted exclamation mark key. | 
| JConstant for the  Jkey. | 
| JAPANESE_HIRAGANAConstant for the Japanese-Hiragana function key. | 
| JAPANESE_KATAKANAConstant for the Japanese-Katakana function key. | 
| JAPANESE_ROMANConstant for the Japanese-Roman function key. | 
| KConstant for the  Kkey. | 
| KANAConstant for the  Kanakey. | 
| KANA_LOCKConstant for the locking Kana function key. | 
| KANJIConstant for the  Kanjikey. | 
| KATAKANAConstant for the Katakana function key. | 
| KP_DOWNConstant for the numeric keypad down arrow key. | 
| KP_LEFTConstant for the numeric keypad left arrow key. | 
| KP_RIGHTConstant for the numeric keypad right arrow key. | 
| KP_UPConstant for the numeric keypad up arrow key. | 
| LConstant for the  Lkey. | 
| LEFTConstant for the non-numpad left arrow key. | 
| LEFT_PARENTHESISConstant for the "(" key. | 
| LESSConstant for the  Lesskey. | 
| MConstant for the  Mkey. | 
| METAConstant for the  Metakey. | 
| MINUSConstant for the minus key, "-" | 
| MODECHANGEConstant for the  Mode Changekey. | 
| MULTIPLYConstant for the  Multiplykey. | 
| MUTEConstant for the  Mutekey. | 
| NConstant for the  Nkey. | 
| NONCONVERTConstant for the Don't Convert function key. | 
| NUM_LOCKConstant for the  Num Lockkey. | 
| NUMBER_SIGNConstant for the "#" key. | 
| NUMPAD0Constant for the  Numpad 0key. | 
| NUMPAD1Constant for the  Numpad 1key. | 
| NUMPAD2Constant for the  Numpad 2key. | 
| NUMPAD3Constant for the  Numpad 3key. | 
| NUMPAD4Constant for the  Numpad 4key. | 
| NUMPAD5Constant for the  Numpad 5key. | 
| NUMPAD6Constant for the  Numpad 6key. | 
| NUMPAD7Constant for the  Numpad 7key. | 
| NUMPAD8Constant for the  Numpad 8key. | 
| NUMPAD9Constant for the  Numpad 9key. | 
| OConstant for the  Okey. | 
| OPEN_BRACKETConstant for the open bracket key, "[" | 
| PConstant for the  Pkey. | 
| PAGE_DOWNConstant for the  Page Downkey. | 
| PAGE_UPConstant for the  Page Upkey. | 
| PASTEConstant for the  Pastekey. | 
| PAUSEConstant for the  Pausekey. | 
| PERIODConstant for the period key, "." | 
| PLAYConstant for the  Playkey. | 
| PLUSConstant for the "+" key. | 
| POUNDConstant for the  Poundkey. | 
| POWERConstant for the  Powerkey. | 
| PREVIOUS_CANDIDATEConstant for the Previous Candidate function key. | 
| PRINTSCREENConstant for the  Print Screenkey. | 
| PROPSConstant for the  Propertieskey. | 
| QConstant for the  Qkey. | 
| QUOTEConstant for the  Quotekey. | 
| QUOTEDBLConstant for the  Double Quotekey. | 
| RConstant for the  Rkey. | 
| RECORDConstant for the  Recordkey. | 
| REWINDConstant for the  Rewindkey. | 
| RIGHTConstant for the non-numpad right arrow key. | 
| RIGHT_PARENTHESISConstant for the ")" key. | 
| ROMAN_CHARACTERSConstant for the Roman Characters function key. | 
| SConstant for the  Skey. | 
| SCROLL_LOCKConstant for the  Scroll Lockkey. | 
| SEMICOLONConstant for the semicolon key, ";" | 
| SEPARATORConstant for the Numpad Separator key. | 
| SHIFTConstant for the  Shiftkey. | 
| SHORTCUTConstant for the  Shortcutkey. | 
| SLASHConstant for the forward slash key, "/" | 
| SOFTKEY_0Constant for the  Softkey 0key. | 
| SOFTKEY_1Constant for the  Softkey 1key. | 
| SOFTKEY_2Constant for the  Softkey 2key. | 
| SOFTKEY_3Constant for the  Softkey 3key. | 
| SOFTKEY_4Constant for the  Softkey 4key. | 
| SOFTKEY_5Constant for the  Softkey 5key. | 
| SOFTKEY_6Constant for the  Softkey 6key. | 
| SOFTKEY_7Constant for the  Softkey 7key. | 
| SOFTKEY_8Constant for the  Softkey 8key. | 
| SOFTKEY_9Constant for the  Softkey 9key. | 
| SPACEConstant for the  Spacekey. | 
| STARConstant for the  Starkey. | 
| STOPConstant for the  Stopkey. | 
| SUBTRACTConstant for the  Subtractkey. | 
| TConstant for the  Tkey. | 
| TABConstant for the  Tabkey. | 
| TRACK_NEXTConstant for the  Next Trackkey. | 
| TRACK_PREVConstant for the  Previous Trackkey. | 
| UConstant for the  Ukey. | 
| UNDEFINEDThis value is used to indicate that the keyCode is unknown. | 
| UNDERSCOREConstant for the "_" key. | 
| UNDOConstant for the  Undokey. | 
| UPConstant for the non-numpad up arrow key. | 
| VConstant for the  Vkey. | 
| VOLUME_DOWNConstant for the  Volume Downkey. | 
| VOLUME_UPConstant for the  Volume Upkey. | 
| WConstant for the  Wkey. | 
| WINDOWSConstant for the Microsoft Windows "Windows" key. | 
| XConstant for the  Xkey. | 
| YConstant for the  Ykey. | 
| ZConstant for the  Zkey. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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 keypad | 
| boolean | isLetterKey()All keys with letters | 
| boolean | isMediaKey()All multimedia keys (channel up/down, volume control, etc...) | 
| boolean | isModifierKey()Keys that could act as a modifier | 
| boolean | isNavigationKey()Navigation keys are arrow keys and Page Down, Page Up, Home, End
 (including keypad keys) | 
| boolean | isWhitespaceKey()Space, tab and enter | 
| static 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. | 
public static final KeyCode ENTER
Enter key.public static final KeyCode BACK_SPACE
Backspace key.public static final KeyCode TAB
Tab key.public static final KeyCode CANCEL
Cancel key.public static final KeyCode CLEAR
Clear key.public static final KeyCode SHIFT
Shift key.public static final KeyCode CONTROL
Ctrl key.public static final KeyCode ALT
Alt key.public static final KeyCode PAUSE
Pause key.public static final KeyCode CAPS
Caps Lock key.public static final KeyCode ESCAPE
Esc key.public static final KeyCode SPACE
Space key.public static final KeyCode PAGE_UP
Page Up key.public static final KeyCode PAGE_DOWN
Page Down key.public static final KeyCode END
End key.public static final KeyCode HOME
Home key.public static final KeyCode LEFT
public static final KeyCode UP
public static final KeyCode RIGHT
public static final KeyCode DOWN
public static final KeyCode COMMA
public static final KeyCode MINUS
public static final KeyCode PERIOD
public static final KeyCode SLASH
public static final KeyCode DIGIT0
0 key.public static final KeyCode DIGIT1
1 key.public static final KeyCode DIGIT2
2 key.public static final KeyCode DIGIT3
3 key.public static final KeyCode DIGIT4
4 key.public static final KeyCode DIGIT5
5 key.public static final KeyCode DIGIT6
6 key.public static final KeyCode DIGIT7
7 key.public static final KeyCode DIGIT8
8 key.public static final KeyCode DIGIT9
9 key.public static final KeyCode SEMICOLON
public static final KeyCode EQUALS
public static final KeyCode A
A key.public static final KeyCode B
B key.public static final KeyCode C
C key.public static final KeyCode D
D key.public static final KeyCode E
E key.public static final KeyCode F
F key.public static final KeyCode G
G key.public static final KeyCode H
H key.public static final KeyCode I
I key.public static final KeyCode J
J key.public static final KeyCode K
K key.public static final KeyCode L
L key.public static final KeyCode M
M key.public static final KeyCode N
N key.public static final KeyCode O
O key.public static final KeyCode P
P key.public static final KeyCode Q
Q key.public static final KeyCode R
R key.public static final KeyCode S
S key.public static final KeyCode T
T key.public static final KeyCode U
U key.public static final KeyCode V
V key.public static final KeyCode W
W key.public static final KeyCode X
X key.public static final KeyCode Y
Y key.public static final KeyCode Z
Z key.public static final KeyCode OPEN_BRACKET
public static final KeyCode BACK_SLASH
public static final KeyCode CLOSE_BRACKET
public static final KeyCode NUMPAD0
Numpad 0 key.public static final KeyCode NUMPAD1
Numpad 1 key.public static final KeyCode NUMPAD2
Numpad 2 key.public static final KeyCode NUMPAD3
Numpad 3 key.public static final KeyCode NUMPAD4
Numpad 4 key.public static final KeyCode NUMPAD5
Numpad 5 key.public static final KeyCode NUMPAD6
Numpad 6 key.public static final KeyCode NUMPAD7
Numpad 7 key.public static final KeyCode NUMPAD8
Numpad 8 key.public static final KeyCode NUMPAD9
Numpad 9 key.public static final KeyCode MULTIPLY
Multiply key.public static final KeyCode ADD
Add key.public static final KeyCode SEPARATOR
public static final KeyCode SUBTRACT
Subtract key.public static final KeyCode DECIMAL
Decimal key.public static final KeyCode DIVIDE
Divide key.public static final KeyCode DELETE
Delete key.public static final KeyCode NUM_LOCK
Num Lock key.public static final KeyCode SCROLL_LOCK
Scroll Lock key.public static final KeyCode F1
public static final KeyCode F2
public static final KeyCode F3
public static final KeyCode F4
public static final KeyCode F5
public static final KeyCode F6
public static final KeyCode F7
public static final KeyCode F8
public static final KeyCode F9
public static final KeyCode F10
public static final KeyCode F11
public static final KeyCode F12
public static final KeyCode F13
public static final KeyCode F14
public static final KeyCode F15
public static final KeyCode F16
public static final KeyCode F17
public static final KeyCode F18
public static final KeyCode F19
public static final KeyCode F20
public static final KeyCode F21
public static final KeyCode F22
public static final KeyCode F23
public static final KeyCode F24
public static final KeyCode PRINTSCREEN
Print Screen key.public static final KeyCode INSERT
Insert key.public static final KeyCode HELP
Help key.public static final KeyCode META
Meta key.public static final KeyCode BACK_QUOTE
Back Quote key.public static final KeyCode QUOTE
Quote key.public static final KeyCode KP_UP
public static final KeyCode KP_DOWN
public static final KeyCode KP_LEFT
public static final KeyCode KP_RIGHT
public static final KeyCode DEAD_GRAVE
Dead Grave key.public static final KeyCode DEAD_ACUTE
Dead Acute key.public static final KeyCode DEAD_CIRCUMFLEX
Dead Circumflex key.public static final KeyCode DEAD_TILDE
Dead Tilde key.public static final KeyCode DEAD_MACRON
Dead Macron key.public static final KeyCode DEAD_BREVE
Dead Breve key.public static final KeyCode DEAD_ABOVEDOT
Dead Abovedot key.public static final KeyCode DEAD_DIAERESIS
Dead Diaeresis key.public static final KeyCode DEAD_ABOVERING
Dead Abovering key.public static final KeyCode DEAD_DOUBLEACUTE
Dead Doubleacute key.public static final KeyCode DEAD_CARON
Dead Caron key.public static final KeyCode DEAD_CEDILLA
Dead Cedilla key.public static final KeyCode DEAD_OGONEK
Dead Ogonek key.public static final KeyCode DEAD_IOTA
Dead Iota key.public static final KeyCode DEAD_VOICED_SOUND
Dead Voiced Sound key.public static final KeyCode DEAD_SEMIVOICED_SOUND
Dead Semivoiced Sound key.public static final KeyCode AMPERSAND
Ampersand key.public static final KeyCode ASTERISK
Asterisk key.public static final KeyCode QUOTEDBL
Double Quote key.public static final KeyCode LESS
Less key.public static final KeyCode GREATER
Greater key.public static final KeyCode BRACELEFT
Left Brace key.public static final KeyCode BRACERIGHT
Right Brace key.public static final KeyCode AT
public static final KeyCode COLON
public static final KeyCode CIRCUMFLEX
public static final KeyCode DOLLAR
public static final KeyCode EURO_SIGN
public static final KeyCode EXCLAMATION_MARK
public static final KeyCode INVERTED_EXCLAMATION_MARK
public static final KeyCode LEFT_PARENTHESIS
public static final KeyCode NUMBER_SIGN
public static final KeyCode PLUS
public static final KeyCode RIGHT_PARENTHESIS
public static final KeyCode UNDERSCORE
public static final KeyCode WINDOWS
public static final KeyCode CONTEXT_MENU
public static final KeyCode FINAL
public static final KeyCode CONVERT
public static final KeyCode NONCONVERT
public static final KeyCode ACCEPT
public static final KeyCode MODECHANGE
Mode Change key.public static final KeyCode KANA
Kana key.public static final KeyCode KANJI
Kanji key.public static final KeyCode ALPHANUMERIC
public static final KeyCode KATAKANA
public static final KeyCode HIRAGANA
public static final KeyCode FULL_WIDTH
public static final KeyCode HALF_WIDTH
public static final KeyCode ROMAN_CHARACTERS
public static final KeyCode ALL_CANDIDATES
public static final KeyCode PREVIOUS_CANDIDATE
public static final KeyCode CODE_INPUT
public static final KeyCode JAPANESE_KATAKANA
public static final KeyCode JAPANESE_HIRAGANA
public static final KeyCode JAPANESE_ROMAN
public static final KeyCode KANA_LOCK
public static final KeyCode INPUT_METHOD_ON_OFF
public static final KeyCode CUT
Cut key.public static final KeyCode COPY
Copy key.public static final KeyCode PASTE
Paste key.public static final KeyCode UNDO
Undo key.public static final KeyCode AGAIN
Again key.public static final KeyCode FIND
Find key.public static final KeyCode PROPS
Properties key.public static final KeyCode STOP
Stop key.public static final KeyCode COMPOSE
public static final KeyCode ALT_GRAPH
public static final KeyCode BEGIN
public static final KeyCode UNDEFINED
public static final KeyCode SOFTKEY_0
Softkey 0 key.public static final KeyCode SOFTKEY_1
Softkey 1 key.public static final KeyCode SOFTKEY_2
Softkey 2 key.public static final KeyCode SOFTKEY_3
Softkey 3 key.public static final KeyCode SOFTKEY_4
Softkey 4 key.public static final KeyCode SOFTKEY_5
Softkey 5 key.public static final KeyCode SOFTKEY_6
Softkey 6 key.public static final KeyCode SOFTKEY_7
Softkey 7 key.public static final KeyCode SOFTKEY_8
Softkey 8 key.public static final KeyCode SOFTKEY_9
Softkey 9 key.public static final KeyCode GAME_A
Game A key.public static final KeyCode GAME_B
Game B key.public static final KeyCode GAME_C
Game C key.public static final KeyCode GAME_D
Game D key.public static final KeyCode STAR
Star key.public static final KeyCode POUND
Pound key.public static final KeyCode POWER
Power key.public static final KeyCode INFO
Info key.public static final KeyCode COLORED_KEY_0
Colored Key 0 key.public static final KeyCode COLORED_KEY_1
Colored Key 1 key.public static final KeyCode COLORED_KEY_2
Colored Key 2 key.public static final KeyCode COLORED_KEY_3
Colored Key 3 key.public static final KeyCode EJECT_TOGGLE
Eject key.public static final KeyCode PLAY
Play key.public static final KeyCode RECORD
Record key.public static final KeyCode FAST_FWD
Fast Forward key.public static final KeyCode REWIND
Rewind key.public static final KeyCode TRACK_PREV
Previous Track key.public static final KeyCode TRACK_NEXT
Next Track key.public static final KeyCode CHANNEL_UP
Channel Up key.public static final KeyCode CHANNEL_DOWN
Channel Down key.public static final KeyCode VOLUME_UP
Volume Up key.public static final KeyCode VOLUME_DOWN
Volume Down key.public static final KeyCode MUTE
Mute key.public static final KeyCode COMMAND
Command key.public static final KeyCode SHORTCUT
Shortcut key.public static KeyCode[] values()
for (KeyCode c : KeyCode.values()) System.out.println(c);
public static KeyCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final boolean isFunctionKey()
public final boolean isNavigationKey()
public final boolean isArrowKey()
public final boolean isModifierKey()
public final boolean isLetterKey()
public final boolean isDigitKey()
public final boolean isKeypadKey()
public final boolean isWhitespaceKey()
public final boolean isMediaKey()
public final String getName()
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.