Interface Key
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
KeyModifier
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface Key extends Serializable
An interface to represent keyboard keys.While the
Keyvalues defined here consist of multiple values in order to account for variability in browsers, theKeyvalues that come from the client only consist of the single value known to the client's Browser.Some of the
Keyvalues map only toevent.keyvalues while otherKeyvalues contain values for bothevent.keyandevent.code, and some only contain aevent.codevalue. In cases where aKeycontaining onlyevent.codevalue is a subset of aKeybased onevent.keyvalue, theevent.codeis included in the latterKeyonly.For example,
Key ALTconsists of values[Alt, AltLeft]andALT_LEFTis a key itself. See the documentation of theKeyinstance for more information about its relation toevent.keyandevent.codevalues.See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values for event.key values and https://w3c.github.io/uievents-code/ for event.code values.
- Since:
- 1.0
- Author:
- Vaadin Ltd.
-
-
Field Summary
Fields Modifier and Type Field Description static KeyABORTThis value matches DOM's KeyboardEvent'sevent.code.static KeyACCEPTTheAccept,Commit, orOKkey or button.static KeyADDThe numeric keypad's addition key,+.static KeyAGAINTheAgainkey.static KeyALL_CANDIDATESTheAll Candidateskey, which starts multi-candidate mode, in which multiple candidates are displayed for the ongoing input.static KeyALPHANUMERICTheAlphanumerickey.static KeyALTTheAlt(Alternative) key.static KeyALT_GRAPHTheAltGrorAltGraph(Alternate Graphics) key.static KeyALT_LEFTAlt,Optionor⌥.static KeyALT_RIGHTAlt,Optionor⌥.This is labelledAltGrkey on many keyboard layouts.static KeyAPP_SWITCHPresents a list of recently-used applications which lets the user change apps quickly.static KeyARROW_DOWNThe down arrow key (↓).static KeyARROW_LEFTThe left arrow key (←).static KeyARROW_RIGHTThe right arrow key (→).static KeyARROW_UPThe up arrow key (↑).static KeyATTNTheAttn(Attention) key.static KeyAUDIO_BALANCE_LEFTAdjusts audio balance toward the left.static KeyAUDIO_BALANCE_RIGHTAdjusts audio balance toward the right.static KeyAUDIO_BASS_BOOST_DOWNReduces bass boosting or cycles downward through bass boost modes or states.static KeyAUDIO_BASS_BOOST_TOGGLEToggles bass boosting on and off.static KeyAUDIO_BASS_BOOST_UPIncreases the amount of bass boosting, or cycles upward through a set of bass boost modes or states.static KeyAUDIO_BASS_DOWNDecreases the amount of bass.static KeyAUDIO_BASS_UPIncreases the amount of bass.static KeyAUDIO_FADER_FRONTAdjusts the audio fader toward the front.static KeyAUDIO_FADER_REARAdjusts the audio fader toward the rear.static KeyAUDIO_SURROUND_MODE_NEXTSelects the next available surround sound mode.static KeyAUDIO_TREBLE_DOWNDecreases the amount of treble.static KeyAUDIO_TREBLE_UPIncreases the amount of treble.static KeyAUDIO_VOLUME_DOWNDecreases the audio volume.static KeyAUDIO_VOLUME_MUTEMutes the audio.static KeyAUDIO_VOLUME_UPIncreases the audio volume.static KeyAVR_INPUTChanges the input mode on an external audio/video receiver (AVR) unit.static KeyAVR_POWERToggles the power on an external AVR unit.static KeyBACKQUOTE`~on a US keyboard.static KeyBACKSLASHUsed for both the US\|(on the 101-key layout) and also for the keylocated between the"andEnterkeys on row C of the 102-, 104- and 106-key layouts.static KeyBACKSPACEBackspaceor⌫.static KeyBRACKET_LEFT[{on a US keyboard.static KeyBRACKET_RIGHT]}on a US keyboard.static KeyBRIGHTNESS_DOWNThe Brightness Down key.static KeyBRIGHTNESS_UPThe Brightness Up key.static KeyBROWSER_BACKNavigates to the previous content or page in the current Web view's history.static KeyBROWSER_FAVORITESOpens the user's list of bookmarks/favorites.static KeyBROWSER_FORWARDNavigates to the next content or page in the current Web view's history.static KeyBROWSER_HOMENavigates to the user's preferred home page.static KeyBROWSER_REFRESHRefreshes the current page or content.static KeyBROWSER_SEARCHActivates the user's preferred search engine or the search interface within their browser.static KeyBROWSER_STOPStops loading the currently displayed Web view or content.static KeyCALLTheCallkey; dials the number which has been entered.static KeyCAMERATheCamerakey; activates the camera.static KeyCAMERA_FOCUSTheFocuskey; focuses the camera.static KeyCANCELTheCancelkey.static KeyCAPS_LOCKTheCapsLockor⇪key.static KeyCHANNEL_DOWNSwitches to the previous channel.static KeyCHANNEL_UPSwitches to the next channel.static KeyCLEARTheClearkey.static KeyCLOSECloses the current document or message.static KeyCLOSED_CAPTION_TOGGLEToggles closed captioning on and off.static KeyCODE_INPUTTheCode Inputkey, which enables code input mode, which lets the user enter characters by typing their code points (their Unicode character numbers, typically).static KeyCOLOR_F0_REDGeneral-purpose media function key, color-coded red; this has index 0 among the colored keys.static KeyCOLOR_F1_GREENGeneral-purpose media function key, color-coded green; this has index 1 among the colored keys.static KeyCOLOR_F2_YELLOWGeneral-purpose media function key, color-coded yellow; this has index 2 among the colored keys.static KeyCOLOR_F3_BLUEGeneral-purpose media function key, color-coded blue; this has index 3 among the colored keys.static KeyCOLOR_F4_GREYGeneral-purpose media function key, color-coded grey; this has index 4 among the colored keys.static KeyCOLOR_F5_BROWNGeneral-purpose media function key, color-coded brown; this has index 5 among the colored keys.static KeyCOMMA,<on a US keyboard.static KeyCOMPOSETheComposekey.static KeyCONTEXT_MENUShows the context menu.static KeyCONTROLTheControl,Ctrl, orCtlkey.static KeyCONTROL_LEFTControlor⌃static KeyCONTROL_RIGHTControlor⌃static KeyCONVERTTheConvertkey, which instructs the IME to convert the current input method sequence into the resulting character.static KeyCOPYTheCopykey (on certain extended keyboards).static KeyCR_SELThe Cursor Select key,CrSel.static KeyCUTTheCutkey (on certain extended keyboards).static KeyDEADA dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters.static KeyDECIMALThe decimal point key (typically.or,) depending on the region.static KeyDELETEThe Delete key,Del, and⌦.static KeyDIGIT_00)on a US keyboard.static KeyDIGIT_11!on a US keyboard.static KeyDIGIT_22@on a US keyboard.static KeyDIGIT_33#on a US keyboard.static KeyDIGIT_44$on a US keyboard.static KeyDIGIT_55%on a US keyboard.static KeyDIGIT_66^on a US keyboard.static KeyDIGIT_77&on a US keyboard.static KeyDIGIT_88*on a US keyboard.static KeyDIGIT_99(on a US keyboard.static KeyDIMMERAdjusts the brightness of the device by toggling between two brightness levels or by cycling among multiple brightness levels.static KeyDISPLAY_SWAPCycles among video sources.static KeyDIVIDEThe numeric keypad's division key, /.static KeyDVRSwitches the input source to the Digital Video Recorder (DVR).static KeyEISUTheEisukey.static KeyEJECTTheEjector⏏key.static KeyENDTheEndkey.static KeyEND_CALLTheEnd CallorHang Upbutton.static KeyENTERTheEnteror↵key.static KeyEQUAL=+on a US keyboard.static KeyERASE_EOFErase to End of Field.static KeyESCAPETheEsc(Escape) or⎋key.static KeyEX_SELTheExSel(Extend Selection) key.static KeyEXECUTETheExecutekey.static KeyEXITThe Exit button, which exits the current application or menu.static KeyF1The first general-purpose function key,F1.static KeyF10TheF10key.static KeyF11TheF11key.static KeyF12TheF12key.static KeyF13TheF13key.static KeyF14TheF14key.static KeyF15TheF15key.static KeyF16TheF16key.static KeyF17TheF17key.static KeyF18TheF18key.static KeyF19TheF19key.static KeyF2TheF2key.static KeyF20TheF20key.static KeyF3TheF3key.static KeyF4TheF4key.static KeyF5TheF5key.static KeyF6TheF6key.static KeyF7TheF7key.static KeyF8TheF8key.static KeyF9TheF9key.static KeyFAVORITE_CLEAR0Clears the program or content stored in the first favorites list slot.static KeyFAVORITE_CLEAR1Clears the program or content stored in the second favorites list slot.static KeyFAVORITE_CLEAR2Clears the program or content stored in the third favorites list slot.static KeyFAVORITE_CLEAR3Clears the program or content stored in the fourth favorites list slot.static KeyFAVORITE_RECALL0Selects (recalls) the program or content stored in the first favorites list slot.static KeyFAVORITE_RECALL1Selects (recalls) the program or content stored in the second favorites list slot.static KeyFAVORITE_RECALL2Selects (recalls) the program or content stored in the third favorites list slot.static KeyFAVORITE_RECALL3Selects (recalls) the program or content stored in the fourth favorites list slot.static KeyFAVORITE_STORE0Stores the current program or content into the first favorites list slot.static KeyFAVORITE_STORE1Stores the current program or content into the second favorites list slot.static KeyFAVORITE_STORE2Stores the current program or content into the third favorites list slot.static KeyFAVORITE_STORE3Stores the current program or content into the fourth favorites list slot.static KeyFINAL_MODETheFinal(Final Mode) key is used on some Asian keyboards to enter final mode when using IMEs.static KeyFINDTheFindkey.static KeyFINISHTheFinishkey.static KeyFNTheFn(Function modifier) key.static KeyFN_LOCKTheFnLockorF-Lock(Function Lock) key.static KeyGO_BACKTheBackbutton.static KeyGO_HOMETheHomebutton, which takes the user to the phone's main screen (usually an application launcher).static KeyGROUP_FIRSTSwitches to the first character group on an ISO/IEC 9995 keyboard.static KeyGROUP_LASTSwitches to the last character group on an ISO/IEC 9995 keyboard.static KeyGROUP_NEXTSwitches to the next character group on an ISO/IEC 9995 keyboard.static KeyGROUP_PREVIOUSSwitches to the previous character group on an ISO/IEC 9995 keyboard.static KeyGUIDEToggles the display of the program or content guide.static KeyGUIDE_NEXT_DAYIf the guide is currently displayed, this button tells the guide to display the next day's content.static KeyGUIDE_PREVIOUS_DAYIf the guide is currently displayed, this button tells the guide to display the previous day's content.static KeyHANGUL_MODETheHangul(Korean character set) mode key, which toggles between Hangul and English entry modes.static KeyHANJA_MODESelects the Hanja mode, for converting Hangul characters to the more specific Hanja characters.static KeyHANKAKUTheHankaku(half-width characters) key.static KeyHEADSET_HOOKTheHeadset Hookkey.static KeyHELPTheHelpkey.static KeyHIBERNATETheHibernatekey.static KeyHIRAGANATheHiraganakey.static KeyHIRAGANA_KATAKANAToggles between the Hiragana and Katakana writing systems.static KeyHOMETheHomeor↖key.static KeyHYPERTheHyperkey.static KeyINFOToggles the display of information about the currently selected content, program, or media.static KeyINSERTThe Insert key,Ins.static KeyINSTANT_REPLAYTells the device to perform an instant replay (typically some form of jumping back a short amount of time then playing it again, possibly but not usually in slow motion).static KeyINTL_BACKSLASHLocated between the leftShiftandZkeys.Labelled\|on a UK keyboard.static KeyINTL_ROLocated between the/and rightShiftkeys.Labelled\ろ( ro ) on a Japanese keyboard.static KeyINTL_YENLocated between the=andBackspacekeys.Labelled¥( yen ) on a Japanese keyboard.static KeyJUNJA_MODESelects the Junja mode, in which Korean is represented using single-byte Latin characters.static KeyKANA_MODETheKana Mode(Kana Lock) key.static KeyKANJI_MODETheKanji Modekey.static KeyKATAKANATheKatakanakey.static KeyKEY_Aaon a US keyboard.Labelledqon an AZERTY (e.g., French) keyboard.static KeyKEY_Bbon a US keyboard.static KeyKEY_Ccon a US keyboard.static KeyKEY_Ddon a US keyboard.static KeyKEY_Eeon a US keyboard.static KeyKEY_Ffon a US keyboard.static KeyKEY_Ggon a US keyboard.static KeyKEY_Hhon a US keyboard.static KeyKEY_Iion a US keyboard.static KeyKEY_Jjon a US keyboard.static KeyKEY_Kkon a US keyboard.static KeyKEY_Llon a US keyboard.static KeyKEY_Mmon a US keyboard.static KeyKEY_Nnon a US keyboard.static KeyKEY_Ooon a US keyboard.static KeyKEY_Ppon a US keyboard.static KeyKEY_Qqon a US keyboard.Labelledaon an AZERTY (e.g., French) keyboard.static KeyKEY_Rron a US keyboard.static KeyKEY_Sson a US keyboard.static KeyKEY_Tton a US keyboard.static KeyKEY_Uuon a US keyboard.static KeyKEY_Vvon a US keyboard.static KeyKEY_Wwon a US keyboard.Labelledzon an AZERTY (e.g., French) keyboard.static KeyKEY_Xxon a US keyboard.static KeyKEY_Yyon a US keyboard.Labelledzon a QWERTZ (e.g., German) keyboard.static KeyKEY_Zzon a US keyboard.Labelledwon an AZERTY (e.g., French) keyboard, andyon a QWERTZ (e.g., German) keyboard.static KeyKEY11The11key found on certain media numeric keypads.static KeyKEY12The12key found on certain media numeric keypads.static KeyLANG_1Korean: HangulMode한/영( han/yeong ) Japanese (Mac keyboard):かな( kana )static KeyLANG_2Korean: Hanja한자( hanja ) Japanese (Mac keyboard):英数( eisu )static KeyLANG_3Japanese (word-processing keyboard): Katakanastatic KeyLANG_4Japanese (word-processing keyboard): Hiraganastatic KeyLANG_5Japanese (word-processing keyboard): Zenkaku/Hankakustatic KeyLAST_NUMBER_REDIALTheRedialbutton, which redials the last-called number.static KeyLAUNCH_APP_1Sometimes labelledMy Computeron the keyboardstatic KeyLAUNCH_APP_2Sometimes labelledCalculatoron the keyboardstatic KeyLAUNCH_APPLICATION1The first generic application launcher button.static KeyLAUNCH_APPLICATION10The 10th generic application launcher button.static KeyLAUNCH_APPLICATION11The 11th generic application launcher button.static KeyLAUNCH_APPLICATION12The 12th generic application launcher button.static KeyLAUNCH_APPLICATION13The 13th generic application launcher button.static KeyLAUNCH_APPLICATION14The 14th generic application launcher button.static KeyLAUNCH_APPLICATION15The 15th generic application launcher button.static KeyLAUNCH_APPLICATION16The 16th generic application launcher button.static KeyLAUNCH_APPLICATION2The second generic application launcher button.static KeyLAUNCH_APPLICATION3The third generic application launcher button.static KeyLAUNCH_APPLICATION4The fourth generic application launcher button.static KeyLAUNCH_APPLICATION5The fifth generic application launcher button.static KeyLAUNCH_APPLICATION6The sixth generic application launcher button.static KeyLAUNCH_APPLICATION7The seventh generic application launcher button.static KeyLAUNCH_APPLICATION8The eighth generic application launcher button.static KeyLAUNCH_APPLICATION9The ninth generic application launcher button.static KeyLAUNCH_CALCULATORTheCalculatorkey.static KeyLAUNCH_CALENDARTheCalendarkey.static KeyLAUNCH_CONTACTSTheContactskey.static KeyLAUNCH_MAILTheMailkey.static KeyLAUNCH_MEDIA_PLAYERTheMedia Playerkey.static KeyLAUNCH_MUSIC_PLAYERTheMusic Playerkey.static KeyLAUNCH_MY_COMPUTERTheMy Computerkey on Windows keyboards.static KeyLAUNCH_PHONEThePhonekey, to open the phone dialer application if one is present.static KeyLAUNCH_SCREEN_SAVERTheScreen Saverkey.static KeyLAUNCH_SPREADSHEETTheSpreadsheetkey.static KeyLAUNCH_WEB_BROWSERTheWeb Browserkey.static KeyLAUNCH_WEB_CAMTheWebCamkey.static KeyLAUNCH_WORD_PROCESSORTheWord Processorkey.static KeyLINKOpens content linked to the current program, if available and possible.static KeyLIST_PROGRAMLists the current program.static KeyLIVE_CONTENTToggles a display listing currently available live content or programs.static KeyLOCKLocks or unlocks the currently selected content or program.static KeyLOG_OFFTheLogOffkey.static KeyMAIL_FORWARDOpens the user interface to forward a message.static KeyMAIL_REPLYOpens the user interface to reply to a message.static KeyMAIL_SENDSends the current message.static KeyMANNER_MODEA button which cycles among the notification modes: silent, vibrate, ring, and so forth.static KeyMEDIA_APPSPresents a list of media applications, such as photo viewers, audio and video players, and games.static KeyMEDIA_AUDIO_TRACKThe Audio Track key.static KeyMEDIA_FAST_FORWARDStarts, continues, or increases the speed of fast forwarding the media.static KeyMEDIA_LASTJumps back to the last-viewed content, program, or other media.static KeyMEDIA_PAUSEPauses the currently playing media.static KeyMEDIA_PLAYStarts or continues playing media at normal speed, if not already doing so.static KeyMEDIA_PLAY_PAUSEToggles between playing and pausing the current media.static KeyMEDIA_RECORDStarts or resumes recording media.static KeyMEDIA_REWINDStarts, continues, or increases the speed of rewinding the media.static KeyMEDIA_SELECTThis value matches DOM's KeyboardEvent'sevent.code.static KeyMEDIA_SKIP_BACKWARDSkips backward to the previous content or program.static KeyMEDIA_SKIP_FORWARDSkips forward to the next content or program.static KeyMEDIA_STEP_BACKWARDSteps backward to the previous content or program.static KeyMEDIA_STEP_FORWARDSteps forward to the next content or program.static KeyMEDIA_STOPStops the current media activity (such as playing, recording, pausing, forwarding, or rewinding).static KeyMEDIA_TOP_MENUTop Menu button; opens the media's main menu, such as on a DVD or Blu-Ray disc.static KeyMEDIA_TRACK_NEXTSeeks to the next media or program track.static KeyMEDIA_TRACK_PREVIOUSSeeks to the previous media or program track.static KeyMETATheMetakey.static KeyMETA_LEFTThe Windows,⌘,Commandor other OS symbol key.static KeyMETA_RIGHTThe Windows,⌘,Commandor other OS symbol key.static KeyMICROPHONE_TOGGLEToggles the microphone on and off.static KeyMICROPHONE_VOLUME_DOWNDecreases the microphone's input volume.static KeyMICROPHONE_VOLUME_MUTEMutes the microphone input.static KeyMICROPHONE_VOLUME_UPIncreases the microphone's input volume.static KeyMINUS-_on a US keyboard.static KeyMODE_CHANGEThe Mode Change key.static KeyMULTIPLYThe numeric keypad's multiplication key,*.static KeyNAVIGATE_INNavigates into a submenu or option.static KeyNAVIGATE_NEXTNavigates to the next item.static KeyNAVIGATE_OUTNavigates out of the current screen or menu.static KeyNAVIGATE_PREVIOUSNavigates to the previous item.static KeyNEWCreates a new document or message.static KeyNEXT_CANDIDATEThe Next Candidate function key.static KeyNEXT_FAVORITE_CHANNELCycles to the next channel in the favorites list.static KeyNEXT_USER_PROFILECycles to the next saved user profile, if this feature is supported and multiple profiles exist.static KeyNON_CONVERTTheNonConvert("Don't convert") key.static KeyNONEThis value is reserved for corner cases of no key value present in event e.g.static KeyNOTIFICATIONTheNotificationkey.static KeyNUM_LOCKTheNumLock(Number Lock) key.static KeyNUMPAD_00 Inson a keyboard0on a phone or remote controlstatic KeyNUMPAD_11 Endon a keyboard1or1 QZon a phone orremote controlstatic KeyNUMPAD_22 ↓on a keyboard2 ABCon a phone or remote controlstatic KeyNUMPAD_33 PgDnon a keyboard3 DEFon a phone or remote controlstatic KeyNUMPAD_44 ←on a keyboard4 GHIon a phone or remote controlstatic KeyNUMPAD_55on a keyboard5 JKLon a phone or remote controlstatic KeyNUMPAD_66 →on a keyboard6 MNOon a phone or remote controlstatic KeyNUMPAD_77 Homeon a keyboard7 PQRSor7 PRSon a phoneor remote controlstatic KeyNUMPAD_88 ↑on a keyboard8 TUVon a phone or remote controlstatic KeyNUMPAD_99 PgUpon a keyboard9 WXYZor9 WXYon a phoneor remote controlstatic KeyNUMPAD_ADD+static KeyNUMPAD_BACKSPACEFound on the Microsoft Natural Keyboard.static KeyNUMPAD_CLEARCorAC(All Clear).static KeyNUMPAD_CLEAR_ENTRYCE(Clear Entry)static KeyNUMPAD_COMMA,(thousands separator).static KeyNUMPAD_DECIMAL.static KeyNUMPAD_DIVIDE/static KeyNUMPAD_ENTERThis value matches DOM's KeyboardEvent'sevent.code.static KeyNUMPAD_EQUAL=static KeyNUMPAD_HASH#on a phone or remote control device.static KeyNUMPAD_MEMORY_ADDM+Add current entry to the value stored in memory.static KeyNUMPAD_MEMORY_CLEARMCClear the value stored in memory.static KeyNUMPAD_MEMORY_RECALLMRReplace the current entry with the value stored in memory.static KeyNUMPAD_MEMORY_STOREMSReplace the value stored in memory with the current entry.static KeyNUMPAD_MEMORY_SUBTRACTM-Subtract current entry from the value stored in memory.static KeyNUMPAD_MULTIPLY*on a keyboard.static KeyNUMPAD_PAREN_LEFT(Found on the Microsoft Natural Keyboard.static KeyNUMPAD_PAREN_RIGHT)Found on the Microsoft Natural Keyboard.static KeyNUMPAD_STAR*on a phone or remote control device.This key is typically found below the7key and to the left of the0key.static KeyNUMPAD_SUBTRACT-static KeyON_DEMANDOpens the user interface for selecting on demand content or programs to watch.static KeyOPENOpens an existing document or message.static KeyPAGE_DOWNThePage Down(orPgDn) key.static KeyPAGE_UPThePage Up(orPgUp) key.static KeyPAIRINGStarts the process of pairing the remote with a device to be controlled.static KeyPASTEPaste from the clipboard.static KeyPAUSEThePausekey.static KeyPERIOD.>on a US keyboard.static KeyPINP_DOWNA button to move the picture-in-picture view downward.static KeyPINP_MOVEA button to control moving the picture-in-picture view.static KeyPINP_TOGGLEToggles display of the picture-in-picture view on and off.static KeyPINP_UPA button to move the picture-in-picture view upward.static KeyPLAYThePlaykey.static KeyPLAY_SPEED_DOWNDecreases the media playback rate.static KeyPLAY_SPEED_RESETReturns the media playback rate to normal.static KeyPLAY_SPEED_UPIncreases the media playback rate.static KeyPOWERThePowerbutton or key, to toggle power on and off.static KeyPOWER_OFFThePowerOfforPowerDownkey.static KeyPREVIOUS_CANDIDATEThe Previous Candidate key.static KeyPRINTPrints the current document or message.static KeyPRINT_SCREENThePrintScreenorPrtScrkey.static KeyPROCESSTheProcesskey.static KeyPROPSTheProps(Properties) key.static KeyQUOTE'"on a US keyboard.static KeyRANDOM_TOGGLEToggles random media (also known as "shuffle mode") on and off.static KeyRC_LOW_BATTERYA code sent when the remote control's battery is low.static KeyRECORD_SPEED_NEXTCycles among the available media recording speeds.static KeyREDORedo the last action.static KeyRESUMEThis value matches DOM's KeyboardEvent'sevent.code.static KeyRF_BYPASSToggles radio frequency (RF) input bypass mode on and off.static KeyROMAJITheRomajikey; selects the Roman character set.static KeySAVESaves the current document or message.static KeySCAN_CHANNELS_TOGGLEToggles the channel scan mode on and off; this is a mode which flips through channels automatically until the user stops the scan.static KeySCREEN_MODE_NEXTCycles through the available screen display modes.static KeySCROLL_LOCKTheScroll Lockkey.static KeySELECTTheSelectkey.static KeySEMICOLON;:on a US keyboard.static KeySEPARATORThe numeric keypad's places separator character (in the United States, this is a comma, but elsewhere it is frequently a period).static KeySETTINGSToggles display of the device's settings screen on and off.static KeySHIFTTheShiftkey.static KeySHIFT_LEFTShiftor⇧static KeySHIFT_RIGHTShiftor⇧static KeySINGLE_CANDIDATEThe Single Candidate key.static KeySLASH/?on a US keyboard.static KeySLEEPThis value matches DOM's KeyboardEvent'sevent.code.static KeySOFT1The first general-purpose virtual function key.static KeySOFT2The second general-purpose virtual function key.static KeySOFT3The third general-purpose virtual function key.static KeySOFT4The fourth general-purpose virtual function key.static KeySPACEThe space key,Space Bar.static KeySPEECH_CORRECTION_LISTPresents a list of possible corrections for a word which was incorrectly identified.static KeySPEECH_INPUT_TOGGLEToggles between dictation mode and command/control mode.static KeySPELL_CHECKStarts spell checking the current document.static KeySPLIT_SCREEN_TOGGLEToggles split screen display mode on and off.static KeySTANDBYTheStandbykey; also known asSuspendorSleep.static KeySTB_INPUTCycles among input modes on an external set-top box (STB).static KeySTB_POWERToggles on and off an external STB.static KeySUBTITLEToggles the display of subtitles on and off if they're available.static KeySUBTRACTThe numeric keypad's subtraction key, -.static KeySUPERTheSuperkey.static KeySUSPENDThis value matches DOM's KeyboardEvent'sevent.code.static KeySYMBOLTheSymbolmodifier key (found on certain virtual keyboards).static KeySYMBOL_LOCKTheSymbol Lockkey.static KeyTABTabor⇥static KeyTELETEXTToggles display of teletext, if available.static KeyTURBOThis value matches DOM's KeyboardEvent'sevent.code.static KeyTVSwitches into TV viewing mode.static KeyTV_3D_MODEToggles 3D TV mode on and off.static KeyTV_ANTENNA_CABLEToggles between antenna and cable inputs.static KeyTV_AUDIO_DESCRIPTIONToggles audio description mode on and off.static KeyTV_AUDIO_DESCRIPTION_MIX_DOWNDecreases the audio description's mixing volume; reduces the volume of the audio descriptions relative to the program sound.static KeyTV_AUDIO_DESCRIPTION_MIX_UPIncreases the audio description's mixing volume; increases the volume of the audio descriptions relative to the program sound.static KeyTV_CONTENTS_MENUDisplays or hides the media contents available for playback (this may be a channel guide showing the currently airing programs, or a list of media files to play).static KeyTV_DATA_SERVICEDisplays or hides the TV's data service menu.static KeyTV_INPUTCycles the input mode on an external TV.static KeyTV_INPUT_COMPONENT1Switches to the input "Component 1."static KeyTV_INPUT_COMPONENT2Switches to the input "Component 2."static KeyTV_INPUT_COMPOSITE1Switches to the input "Composite 1."static KeyTV_INPUT_COMPOSITE2Switches to the input "Composite 2."static KeyTV_INPUT_HDMI1Switches to the input "HDMI 1."static KeyTV_INPUT_HDMI2Switches to the input "HDMI 2."static KeyTV_INPUT_HDMI3Switches to the input "HDMI 3."static KeyTV_INPUT_HDMI4Switches to the input "HDMI 4."static KeyTV_INPUT_VGA1Switches to the input "VGA 1."static KeyTV_MEDIA_CONTEXTThe Media Context menu key.static KeyTV_NETWORKToggle the TV's network connection on and off.static KeyTV_NUMBER_ENTRYPut the TV into number entry mode.static KeyTV_POWERThe device's power button.static KeyTV_RADIO_SERVICERadio button.static KeyTV_SATELLITESatellite button.static KeyTV_SATELLITE_BSBroadcast Satellite button.static KeyTV_SATELLITE_CSCommunication Satellite button.static KeyTV_SATELLITE_TOGGLEToggles among available satellites.static KeyTV_TERRESTRIAL_ANALOGSelects analog terrestrial television service (analog cable or antenna reception).static KeyTV_TERRESTRIAL_DIGITALSelects digital terrestrial television service (digital cable or antenna reception).static KeyTV_TIMERTimer programming button.static KeyUNDOUndo the last action.static KeyUNIDENTIFIEDThe user agent wasn't able to map the event's virtual keycode to a specific key value.static KeyVIDEO_MODE_NEXTCycles through the available video modes.static KeyVOICE_DIALTheVoice Dialkey.static KeyWAKE_UPTheWakeUpkey; used to wake the computer from the hibernation or standby modes.static KeyWINKCauses the device to identify itself in some fashion, such as by flashing a light, briefly changing the brightness of indicator lights, or emitting a tone.static KeyZENKAKUTheZenkaku(full width) characters key.static KeyZENKAKU_HANAKUTheZenkaku/Hankaku(full width/half width) toggle key.static KeyZOOM_INTheZoomInkey.static KeyZOOM_OUTTheZoomOutkey.static KeyZOOM_TOGGLEToggles between full-screen and scaled content display, or otherwise change the magnification level.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<String>getKeys()Returns the list (with at least one element) of printable representations of the key, which should reflect thekeyproperty in the JavaScriptKeyboardEvent.static booleanisModifier(Key key)Returns whether the specified key is a modifier or not.default booleanmatches(String key)Checks ifkeyis a printable representation for this instance.static Keyof(String key, String... additionalKeys)Returns aKeyinstance for a printable representation of the key.
-
-
-
Field Detail
-
UNIDENTIFIED
static final Key UNIDENTIFIED
The user agent wasn't able to map the event's virtual keycode to a specific key value. This can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.In the case of
event.codevalues, this value code should be used when no other value given in this specification is appropriate.This value matches DOM's KeyboardEvent's
event.code.
-
ALT
static final Key ALT
TheAlt(Alternative) key.The second value matches DOM's KeyboardEvent's
event.code.- See Also:
ALT_LEFT
-
ALT_GRAPH
static final Key ALT_GRAPH
TheAltGrorAltGraph(Alternate Graphics) key. Enables the ISO Level 3 shift modifier (whereShiftis the level 2 modifier).The second value matches DOM's KeyboardEvent's
event.code.- See Also:
ALT_RIGHT
-
CAPS_LOCK
static final Key CAPS_LOCK
TheCapsLockor⇪key. Toggles the capital character lock on and off for subsequent input.This value matches DOM's KeyboardEvent's
event.code.
-
CONTROL
static final Key CONTROL
TheControl,Ctrl, orCtlkey. Allows typing control characters.The second and third values match DOM's KeyboardEvent's
event.code.- See Also:
CONTROL_LEFT,CONTROL_RIGHT
-
FN
static final Key FN
TheFn(Function modifier) key. Used to allow generating function key (F1-F15, for instance) characters on keyboards without a dedicated function key area. Often handled in hardware so that events aren't generated for this key.This value matches DOM's KeyboardEvent's
event.code.
-
FN_LOCK
static final Key FN_LOCK
TheFnLockorF-Lock(Function Lock) key. Toggles the function key mode described by "Fn" on and off. Often handled in hardware so that events aren't generated for this key. Found on the Microsoft Natural Keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
HYPER
static final Key HYPER
TheHyperkey.This value matches DOM's KeyboardEvent's
event.code.
-
META
static final Key META
TheMetakey. Allows issuing special command inputs. This is theWindowslogo key, or theCommandor⌘key on Mac keyboards.
-
NUM_LOCK
static final Key NUM_LOCK
TheNumLock(Number Lock) key. Toggles the numeric keypad between number entry some other mode (often directional arrows).On the Mac, the " NumLock " code should be used for the numpad
Clearkey.This value matches DOM's KeyboardEvent's
event.code.
-
SCROLL_LOCK
static final Key SCROLL_LOCK
TheScroll Lockkey. Toggles between scrolling and cursor movement modes.This value matches DOM's KeyboardEvent's
event.code.
-
SHIFT
static final Key SHIFT
TheShiftkey. Modifies keystrokes to allow typing upper (or other) case letters, and to support typing punctuation and other special characters.The second and third values match DOM's KeyboardEvent's
event.code.- See Also:
SHIFT_LEFT,SHIFT_RIGHT
-
SUPER
static final Key SUPER
TheSuperkey.This value matches DOM's KeyboardEvent's
event.code.
-
SYMBOL
static final Key SYMBOL
TheSymbolmodifier key (found on certain virtual keyboards).
-
SYMBOL_LOCK
static final Key SYMBOL_LOCK
TheSymbol Lockkey.
-
ENTER
static final Key ENTER
TheEnteror↵key. LabelledReturnon Apple keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
TAB
static final Key TAB
Tabor⇥This value matches DOM's KeyboardEvent's
event.code.
-
SPACE
static final Key SPACE
The space key,Space Bar.The second value matches DOM's KeyboardEvent's
event.code.
-
ARROW_DOWN
static final Key ARROW_DOWN
The down arrow key (↓).This value matches DOM's KeyboardEvent's
event.code.
-
ARROW_LEFT
static final Key ARROW_LEFT
The left arrow key (←).This value matches DOM's KeyboardEvent's
event.code.
-
ARROW_RIGHT
static final Key ARROW_RIGHT
The right arrow key (→).This value matches DOM's KeyboardEvent's
event.code.
-
ARROW_UP
static final Key ARROW_UP
The up arrow key (↑).This value matches DOM's KeyboardEvent's
event.code.
-
END
static final Key END
TheEndkey. Moves to the end of content.In case of a
event.codein the case ofevent.keythe name may bePage Down,Endor↘.This value matches DOM's KeyboardEvent's
event.code.
-
HOME
static final Key HOME
TheHomeor↖key. Moves to the start of content.This value matches DOM's KeyboardEvent's
event.code.
-
PAGE_DOWN
static final Key PAGE_DOWN
ThePage Down(orPgDn) key. Scrolls down or displays the next page of content.This value matches DOM's KeyboardEvent's
event.code.
-
PAGE_UP
static final Key PAGE_UP
ThePage Up(orPgUp) key. Scrolls up or displays the previous page of content.This value matches DOM's KeyboardEvent's
event.code.
-
BACKSPACE
static final Key BACKSPACE
Backspaceor⌫. LabelledDeleteon Apple keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
CLEAR
static final Key CLEAR
TheClearkey. Removes the currently selected input.
-
COPY
static final Key COPY
TheCopykey (on certain extended keyboards).This value matches DOM's KeyboardEvent's
event.code.
-
CR_SEL
static final Key CR_SEL
The Cursor Select key,CrSel.
-
CUT
static final Key CUT
TheCutkey (on certain extended keyboards).This value matches DOM's KeyboardEvent's
event.code.
-
DELETE
static final Key DELETE
The Delete key,Del, and⌦. The forward delete key. Note that on Apple keyboards, the key labelledDeleteon the main part of the keyboard should be encoded as " Backspace " .This first value matches DOM's KeyboardEvent's
event.code.
-
ERASE_EOF
static final Key ERASE_EOF
Erase to End of Field. Deletes all characters from the current cursor position to the end of the current field.
-
EX_SEL
static final Key EX_SEL
TheExSel(Extend Selection) key.
-
INSERT
static final Key INSERT
The Insert key,Ins. Toggles between inserting and overwriting text. Not present on Apple keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
PASTE
static final Key PASTE
Paste from the clipboard.This value matches DOM's KeyboardEvent's
event.code.
-
REDO
static final Key REDO
Redo the last action.
-
UNDO
static final Key UNDO
Undo the last action.This value matches DOM's KeyboardEvent's
event.code.
-
ACCEPT
static final Key ACCEPT
TheAccept,Commit, orOKkey or button. Accepts the currently selected option or input method sequence conversion.
-
AGAIN
static final Key AGAIN
TheAgainkey. Redoes or repeats a previous action. Found on Sun’s USB keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
ATTN
static final Key ATTN
TheAttn(Attention) key.
-
CANCEL
static final Key CANCEL
TheCancelkey.
-
CONTEXT_MENU
static final Key CONTEXT_MENU
Shows the context menu. Typically found between theWindows(orOS) key and theControlkey on the right side of the keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
ESCAPE
static final Key ESCAPE
TheEsc(Escape) or⎋key. Typically used as an exit, cancel, or "escape this operation" button. Historically, the Escape character was used to signal the start of a special control sequence of characters called an "escape sequence."The first value matches DOM's KeyboardEvent's
event.code.
-
EXECUTE
static final Key EXECUTE
TheExecutekey.
-
FIND
static final Key FIND
TheFindkey. Opens an interface (typically a dialog box) for performing a find/search operation.This value matches DOM's KeyboardEvent's
event.code.
-
FINISH
static final Key FINISH
TheFinishkey.
-
HELP
static final Key HELP
TheHelpkey. Opens or toggles the display of help information. Not present on standard PC keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
PAUSE
static final Key PAUSE
ThePausekey. Pauses the current application or state, if applicable. Note: This shouldn't be confused with the"MediaPause"key value, which is used for media controllers, rather than to control applications and processes.This value matches DOM's KeyboardEvent's
event.code.
-
PLAY
static final Key PLAY
ThePlaykey. Resumes a previously paused application, if applicable. Note: This shouldn't be confused with the"MediaPlay"key value, which is used for media controllers, rather than to control applications and processes.
-
PROPS
static final Key PROPS
TheProps(Properties) key.This value matches DOM's KeyboardEvent's
event.code.
-
SELECT
static final Key SELECT
TheSelectkey.This value matches DOM's KeyboardEvent's
event.code.
-
ZOOM_IN
static final Key ZOOM_IN
TheZoomInkey.
-
ZOOM_OUT
static final Key ZOOM_OUT
TheZoomOutkey.
-
BRIGHTNESS_DOWN
static final Key BRIGHTNESS_DOWN
The Brightness Down key. Typically used to reduce the brightness of the display.
-
BRIGHTNESS_UP
static final Key BRIGHTNESS_UP
The Brightness Up key. Typically increases the brightness of the display.
-
EJECT
static final Key EJECT
TheEjector⏏key. Ejects removable media (or toggles an optical storage device tray open and closed).This value matches DOM's KeyboardEvent's
event.code.
-
LOG_OFF
static final Key LOG_OFF
TheLogOffkey.
-
POWER
static final Key POWER
ThePowerbutton or key, to toggle power on and off.Note: Not all systems pass this key through to the user agent.
This value matches DOM's KeyboardEvent's
event.code.
-
POWER_OFF
static final Key POWER_OFF
ThePowerOfforPowerDownkey. Shuts off the system.
-
PRINT_SCREEN
static final Key PRINT_SCREEN
ThePrintScreenorPrtScrkey. SometimesSnapShot. Captures the screen and prints it or saves it to disk.This value matches DOM's KeyboardEvent's
event.code.
-
HIBERNATE
static final Key HIBERNATE
TheHibernatekey. This saves the state of the computer to disk and then shuts down; the computer can be returned to its previous state by restoring the saved state information.
-
STANDBY
static final Key STANDBY
TheStandbykey; also known asSuspendorSleep. This turns off the display and puts the computer in a low power consumption mode, without completely powering off.
-
WAKE_UP
static final Key WAKE_UP
TheWakeUpkey; used to wake the computer from the hibernation or standby modes.This value matches DOM's KeyboardEvent's
event.code.
-
ALL_CANDIDATES
static final Key ALL_CANDIDATES
TheAll Candidateskey, which starts multi-candidate mode, in which multiple candidates are displayed for the ongoing input.
-
ALPHANUMERIC
static final Key ALPHANUMERIC
TheAlphanumerickey.
-
CODE_INPUT
static final Key CODE_INPUT
TheCode Inputkey, which enables code input mode, which lets the user enter characters by typing their code points (their Unicode character numbers, typically).
-
COMPOSE
static final Key COMPOSE
TheComposekey.
-
CONVERT
static final Key CONVERT
TheConvertkey, which instructs the IME to convert the current input method sequence into the resulting character.Japanese:
変換( henkan )This value matches DOM's KeyboardEvent's
event.code.
-
DEAD
static final Key DEAD
A dead "combining" key; that is, a key which is used in tandem with other keys to generate accented and other modified characters.
-
FINAL_MODE
static final Key FINAL_MODE
TheFinal(Final Mode) key is used on some Asian keyboards to enter final mode when using IMEs.
-
GROUP_FIRST
static final Key GROUP_FIRST
Switches to the first character group on an ISO/IEC 9995 keyboard. Each key may have multiple groups of characters, each in its own column. Pressing this key instructs the device to interpret keypresses as coming from the first column on subsequent keystrokes.
-
GROUP_LAST
static final Key GROUP_LAST
Switches to the last character group on an ISO/IEC 9995 keyboard.
-
GROUP_NEXT
static final Key GROUP_NEXT
Switches to the next character group on an ISO/IEC 9995 keyboard.
-
GROUP_PREVIOUS
static final Key GROUP_PREVIOUS
Switches to the previous character group on an ISO/IEC 9995 keyboard.
-
MODE_CHANGE
static final Key MODE_CHANGE
The Mode Change key. Toggles or cycles among input modes of IMEs.
-
NEXT_CANDIDATE
static final Key NEXT_CANDIDATE
The Next Candidate function key. Selects the next possible match for the ongoing input.
-
NON_CONVERT
static final Key NON_CONVERT
TheNonConvert("Don't convert") key. This accepts the current input method sequence without running conversion when using an IME.Japanese:
無変換( muhenkan )This value matches DOM's KeyboardEvent's
event.code.
-
PREVIOUS_CANDIDATE
static final Key PREVIOUS_CANDIDATE
The Previous Candidate key. Selects the previous possible match for the ongoing input.
-
PROCESS
static final Key PROCESS
TheProcesskey. Instructs the IME to process the conversion.
-
SINGLE_CANDIDATE
static final Key SINGLE_CANDIDATE
The Single Candidate key. Enables single candidate mode (as opposed to multi-candidate mode); in this mode, only one candidate is displayed at a time.
-
HANGUL_MODE
static final Key HANGUL_MODE
TheHangul(Korean character set) mode key, which toggles between Hangul and English entry modes.
-
HANJA_MODE
static final Key HANJA_MODE
Selects the Hanja mode, for converting Hangul characters to the more specific Hanja characters.
-
JUNJA_MODE
static final Key JUNJA_MODE
Selects the Junja mode, in which Korean is represented using single-byte Latin characters.
-
EISU
static final Key EISU
TheEisukey. This key's purpose is defined by the IME, but may be used to close the IME.
-
HANKAKU
static final Key HANKAKU
TheHankaku(half-width characters) key.
-
HIRAGANA
static final Key HIRAGANA
TheHiraganakey. Use for dedicatedひらがなkey found on some Japanese word processing keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
HIRAGANA_KATAKANA
static final Key HIRAGANA_KATAKANA
Toggles between the Hiragana and Katakana writing systems.
-
KANA_MODE
static final Key KANA_MODE
TheKana Mode(Kana Lock) key.Japanese:
カタカナ/ひらがな/ローマ字( katakana/hiragana/romaji )This value matches DOM's KeyboardEvent's
event.code.
-
KANJI_MODE
static final Key KANJI_MODE
TheKanji Modekey. Enables entering Japanese text using the ideographic characters of Chinese origin.
-
KATAKANA
static final Key KATAKANA
TheKatakanakey. Use for dedicatedカタカナkey found on some Japanese word processing keyboards.This value matches DOM's KeyboardEvent's
event.code.
-
ROMAJI
static final Key ROMAJI
TheRomajikey; selects the Roman character set.
-
ZENKAKU
static final Key ZENKAKU
TheZenkaku(full width) characters key.
-
ZENKAKU_HANAKU
static final Key ZENKAKU_HANAKU
TheZenkaku/Hankaku(full width/half width) toggle key.
-
F1
static final Key F1
The first general-purpose function key,F1.This value matches DOM's KeyboardEvent's
event.code.
-
F2
static final Key F2
TheF2key.This value matches DOM's KeyboardEvent's
event.code.
-
F3
static final Key F3
TheF3key.This value matches DOM's KeyboardEvent's
event.code.
-
F4
static final Key F4
TheF4key.This value matches DOM's KeyboardEvent's
event.code.
-
F5
static final Key F5
TheF5key.This value matches DOM's KeyboardEvent's
event.code.
-
F6
static final Key F6
TheF6key.This value matches DOM's KeyboardEvent's
event.code.
-
F7
static final Key F7
TheF7key.This value matches DOM's KeyboardEvent's
event.code.
-
F8
static final Key F8
TheF8key.This value matches DOM's KeyboardEvent's
event.code.
-
F9
static final Key F9
TheF9key.This value matches DOM's KeyboardEvent's
event.code.
-
F10
static final Key F10
TheF10key.This value matches DOM's KeyboardEvent's
event.code.
-
F11
static final Key F11
TheF11key.This value matches DOM's KeyboardEvent's
event.code.
-
F12
static final Key F12
TheF12key.This value matches DOM's KeyboardEvent's
event.code.
-
F13
static final Key F13
TheF13key.
-
F14
static final Key F14
TheF14key.
-
F15
static final Key F15
TheF15key.
-
F16
static final Key F16
TheF16key.
-
F17
static final Key F17
TheF17key.
-
F18
static final Key F18
TheF18key.
-
F19
static final Key F19
TheF19key.
-
F20
static final Key F20
TheF20key.
-
SOFT1
static final Key SOFT1
The first general-purpose virtual function key.
-
SOFT2
static final Key SOFT2
The second general-purpose virtual function key.
-
SOFT3
static final Key SOFT3
The third general-purpose virtual function key.
-
SOFT4
static final Key SOFT4
The fourth general-purpose virtual function key.
-
APP_SWITCH
static final Key APP_SWITCH
Presents a list of recently-used applications which lets the user change apps quickly.
-
CALL
static final Key CALL
TheCallkey; dials the number which has been entered.
-
CAMERA
static final Key CAMERA
TheCamerakey; activates the camera.
-
CAMERA_FOCUS
static final Key CAMERA_FOCUS
TheFocuskey; focuses the camera.
-
END_CALL
static final Key END_CALL
TheEnd CallorHang Upbutton.
-
GO_BACK
static final Key GO_BACK
TheBackbutton.
-
GO_HOME
static final Key GO_HOME
TheHomebutton, which takes the user to the phone's main screen (usually an application launcher).
-
HEADSET_HOOK
static final Key HEADSET_HOOK
TheHeadset Hookkey. This is typically actually a button on the headset which is used to hang up calls and play or pause media.
-
LAST_NUMBER_REDIAL
static final Key LAST_NUMBER_REDIAL
TheRedialbutton, which redials the last-called number.
-
NOTIFICATION
static final Key NOTIFICATION
TheNotificationkey.
-
MANNER_MODE
static final Key MANNER_MODE
A button which cycles among the notification modes: silent, vibrate, ring, and so forth.
-
VOICE_DIAL
static final Key VOICE_DIAL
TheVoice Dialkey. Initiates voice dialing.
-
CHANNEL_DOWN
static final Key CHANNEL_DOWN
Switches to the previous channel.
-
CHANNEL_UP
static final Key CHANNEL_UP
Switches to the next channel.
-
MEDIA_FAST_FORWARD
static final Key MEDIA_FAST_FORWARD
Starts, continues, or increases the speed of fast forwarding the media.
-
MEDIA_PAUSE
static final Key MEDIA_PAUSE
Pauses the currently playing media. Some older applications use simply "Pause" but this is not correct.
-
MEDIA_PLAY
static final Key MEDIA_PLAY
Starts or continues playing media at normal speed, if not already doing so. Has no effect otherwise.
-
MEDIA_PLAY_PAUSE
static final Key MEDIA_PLAY_PAUSE
Toggles between playing and pausing the current media.This value matches DOM's KeyboardEvent's
event.code.
-
MEDIA_RECORD
static final Key MEDIA_RECORD
Starts or resumes recording media.
-
MEDIA_REWIND
static final Key MEDIA_REWIND
Starts, continues, or increases the speed of rewinding the media.
-
MEDIA_STOP
static final Key MEDIA_STOP
Stops the current media activity (such as playing, recording, pausing, forwarding, or rewinding). Has no effect if the media is currently stopped already.This value matches DOM's KeyboardEvent's
event.code.
-
MEDIA_TRACK_NEXT
static final Key MEDIA_TRACK_NEXT
Seeks to the next media or program track.This value matches DOM's KeyboardEvent's
event.code.
-
MEDIA_TRACK_PREVIOUS
static final Key MEDIA_TRACK_PREVIOUS
Seeks to the previous media or program track.This value matches DOM's KeyboardEvent's
event.code.
-
AUDIO_BALANCE_LEFT
static final Key AUDIO_BALANCE_LEFT
Adjusts audio balance toward the left.
-
AUDIO_BALANCE_RIGHT
static final Key AUDIO_BALANCE_RIGHT
Adjusts audio balance toward the right.
-
AUDIO_BASS_DOWN
static final Key AUDIO_BASS_DOWN
Decreases the amount of bass.
-
AUDIO_BASS_BOOST_DOWN
static final Key AUDIO_BASS_BOOST_DOWN
Reduces bass boosting or cycles downward through bass boost modes or states.
-
AUDIO_BASS_BOOST_TOGGLE
static final Key AUDIO_BASS_BOOST_TOGGLE
Toggles bass boosting on and off.
-
AUDIO_BASS_BOOST_UP
static final Key AUDIO_BASS_BOOST_UP
Increases the amount of bass boosting, or cycles upward through a set of bass boost modes or states.
-
AUDIO_BASS_UP
static final Key AUDIO_BASS_UP
Increases the amount of bass.
-
AUDIO_FADER_FRONT
static final Key AUDIO_FADER_FRONT
Adjusts the audio fader toward the front.
-
AUDIO_FADER_REAR
static final Key AUDIO_FADER_REAR
Adjusts the audio fader toward the rear.
-
AUDIO_SURROUND_MODE_NEXT
static final Key AUDIO_SURROUND_MODE_NEXT
Selects the next available surround sound mode.
-
AUDIO_TREBLE_DOWN
static final Key AUDIO_TREBLE_DOWN
Decreases the amount of treble.
-
AUDIO_TREBLE_UP
static final Key AUDIO_TREBLE_UP
Increases the amount of treble.
-
AUDIO_VOLUME_DOWN
static final Key AUDIO_VOLUME_DOWN
Decreases the audio volume.This value matches DOM's KeyboardEvent's
event.code.
-
AUDIO_VOLUME_MUTE
static final Key AUDIO_VOLUME_MUTE
Mutes the audio.This value matches DOM's KeyboardEvent's
event.code.
-
AUDIO_VOLUME_UP
static final Key AUDIO_VOLUME_UP
Increases the audio volume.This value matches DOM's KeyboardEvent's
event.code.
-
MICROPHONE_TOGGLE
static final Key MICROPHONE_TOGGLE
Toggles the microphone on and off.
-
MICROPHONE_VOLUME_DOWN
static final Key MICROPHONE_VOLUME_DOWN
Decreases the microphone's input volume.
-
MICROPHONE_VOLUME_MUTE
static final Key MICROPHONE_VOLUME_MUTE
Mutes the microphone input.
-
MICROPHONE_VOLUME_UP
static final Key MICROPHONE_VOLUME_UP
Increases the microphone's input volume.
-
TV
static final Key TV
Switches into TV viewing mode.
-
TV_3D_MODE
static final Key TV_3D_MODE
Toggles 3D TV mode on and off.
-
TV_ANTENNA_CABLE
static final Key TV_ANTENNA_CABLE
Toggles between antenna and cable inputs.
-
TV_AUDIO_DESCRIPTION
static final Key TV_AUDIO_DESCRIPTION
Toggles audio description mode on and off.
-
TV_AUDIO_DESCRIPTION_MIX_DOWN
static final Key TV_AUDIO_DESCRIPTION_MIX_DOWN
Decreases the audio description's mixing volume; reduces the volume of the audio descriptions relative to the program sound.
-
TV_AUDIO_DESCRIPTION_MIX_UP
static final Key TV_AUDIO_DESCRIPTION_MIX_UP
Increases the audio description's mixing volume; increases the volume of the audio descriptions relative to the program sound.
-
TV_CONTENTS_MENU
static final Key TV_CONTENTS_MENU
Displays or hides the media contents available for playback (this may be a channel guide showing the currently airing programs, or a list of media files to play).
-
TV_DATA_SERVICE
static final Key TV_DATA_SERVICE
Displays or hides the TV's data service menu.
-
TV_INPUT
static final Key TV_INPUT
Cycles the input mode on an external TV.
-
TV_INPUT_COMPONENT1
static final Key TV_INPUT_COMPONENT1
Switches to the input "Component 1."
-
TV_INPUT_COMPONENT2
static final Key TV_INPUT_COMPONENT2
Switches to the input "Component 2."
-
TV_INPUT_COMPOSITE1
static final Key TV_INPUT_COMPOSITE1
Switches to the input "Composite 1."
-
TV_INPUT_COMPOSITE2
static final Key TV_INPUT_COMPOSITE2
Switches to the input "Composite 2."
-
TV_INPUT_HDMI1
static final Key TV_INPUT_HDMI1
Switches to the input "HDMI 1."
-
TV_INPUT_HDMI2
static final Key TV_INPUT_HDMI2
Switches to the input "HDMI 2."
-
TV_INPUT_HDMI3
static final Key TV_INPUT_HDMI3
Switches to the input "HDMI 3."
-
TV_INPUT_HDMI4
static final Key TV_INPUT_HDMI4
Switches to the input "HDMI 4."
-
TV_INPUT_VGA1
static final Key TV_INPUT_VGA1
Switches to the input "VGA 1."
-
TV_MEDIA_CONTEXT
static final Key TV_MEDIA_CONTEXT
The Media Context menu key.
-
TV_NETWORK
static final Key TV_NETWORK
Toggle the TV's network connection on and off.
-
TV_NUMBER_ENTRY
static final Key TV_NUMBER_ENTRY
Put the TV into number entry mode.
-
TV_POWER
static final Key TV_POWER
The device's power button.
-
TV_RADIO_SERVICE
static final Key TV_RADIO_SERVICE
Radio button.
-
TV_SATELLITE
static final Key TV_SATELLITE
Satellite button.
-
TV_SATELLITE_BS
static final Key TV_SATELLITE_BS
Broadcast Satellite button.
-
TV_SATELLITE_CS
static final Key TV_SATELLITE_CS
Communication Satellite button.
-
TV_SATELLITE_TOGGLE
static final Key TV_SATELLITE_TOGGLE
Toggles among available satellites.
-
TV_TERRESTRIAL_ANALOG
static final Key TV_TERRESTRIAL_ANALOG
Selects analog terrestrial television service (analog cable or antenna reception).
-
TV_TERRESTRIAL_DIGITAL
static final Key TV_TERRESTRIAL_DIGITAL
Selects digital terrestrial television service (digital cable or antenna reception).
-
TV_TIMER
static final Key TV_TIMER
Timer programming button.
-
AVR_INPUT
static final Key AVR_INPUT
Changes the input mode on an external audio/video receiver (AVR) unit.
-
AVR_POWER
static final Key AVR_POWER
Toggles the power on an external AVR unit.
-
COLOR_F0_RED
static final Key COLOR_F0_RED
General-purpose media function key, color-coded red; this has index 0 among the colored keys.
-
COLOR_F1_GREEN
static final Key COLOR_F1_GREEN
General-purpose media function key, color-coded green; this has index 1 among the colored keys.
-
COLOR_F2_YELLOW
static final Key COLOR_F2_YELLOW
General-purpose media function key, color-coded yellow; this has index 2 among the colored keys.
-
COLOR_F3_BLUE
static final Key COLOR_F3_BLUE
General-purpose media function key, color-coded blue; this has index 3 among the colored keys.
-
COLOR_F4_GREY
static final Key COLOR_F4_GREY
General-purpose media function key, color-coded grey; this has index 4 among the colored keys.
-
COLOR_F5_BROWN
static final Key COLOR_F5_BROWN
General-purpose media function key, color-coded brown; this has index 5 among the colored keys.
-
CLOSED_CAPTION_TOGGLE
static final Key CLOSED_CAPTION_TOGGLE
Toggles closed captioning on and off.
-
DIMMER
static final Key DIMMER
Adjusts the brightness of the device by toggling between two brightness levels or by cycling among multiple brightness levels.
-
DISPLAY_SWAP
static final Key DISPLAY_SWAP
Cycles among video sources.
-
DVR
static final Key DVR
Switches the input source to the Digital Video Recorder (DVR).
-
EXIT
static final Key EXIT
The Exit button, which exits the current application or menu.
-
FAVORITE_CLEAR0
static final Key FAVORITE_CLEAR0
Clears the program or content stored in the first favorites list slot.
-
FAVORITE_CLEAR1
static final Key FAVORITE_CLEAR1
Clears the program or content stored in the second favorites list slot.
-
FAVORITE_CLEAR2
static final Key FAVORITE_CLEAR2
Clears the program or content stored in the third favorites list slot.
-
FAVORITE_CLEAR3
static final Key FAVORITE_CLEAR3
Clears the program or content stored in the fourth favorites list slot.
-
FAVORITE_RECALL0
static final Key FAVORITE_RECALL0
Selects (recalls) the program or content stored in the first favorites list slot.
-
FAVORITE_RECALL1
static final Key FAVORITE_RECALL1
Selects (recalls) the program or content stored in the second favorites list slot.
-
FAVORITE_RECALL2
static final Key FAVORITE_RECALL2
Selects (recalls) the program or content stored in the third favorites list slot.
-
FAVORITE_RECALL3
static final Key FAVORITE_RECALL3
Selects (recalls) the program or content stored in the fourth favorites list slot.
-
FAVORITE_STORE0
static final Key FAVORITE_STORE0
Stores the current program or content into the first favorites list slot.
-
FAVORITE_STORE1
static final Key FAVORITE_STORE1
Stores the current program or content into the second favorites list slot.
-
FAVORITE_STORE2
static final Key FAVORITE_STORE2
Stores the current program or content into the third favorites list slot.
-
FAVORITE_STORE3
static final Key FAVORITE_STORE3
Stores the current program or content into the fourth favorites list slot.
-
GUIDE
static final Key GUIDE
Toggles the display of the program or content guide.
-
GUIDE_NEXT_DAY
static final Key GUIDE_NEXT_DAY
If the guide is currently displayed, this button tells the guide to display the next day's content.
-
GUIDE_PREVIOUS_DAY
static final Key GUIDE_PREVIOUS_DAY
If the guide is currently displayed, this button tells the guide to display the previous day's content.
-
INFO
static final Key INFO
Toggles the display of information about the currently selected content, program, or media.
-
INSTANT_REPLAY
static final Key INSTANT_REPLAY
Tells the device to perform an instant replay (typically some form of jumping back a short amount of time then playing it again, possibly but not usually in slow motion).
-
LINK
static final Key LINK
Opens content linked to the current program, if available and possible.
-
LIST_PROGRAM
static final Key LIST_PROGRAM
Lists the current program.
-
LIVE_CONTENT
static final Key LIVE_CONTENT
Toggles a display listing currently available live content or programs.
-
LOCK
static final Key LOCK
Locks or unlocks the currently selected content or program.
-
MEDIA_APPS
static final Key MEDIA_APPS
Presents a list of media applications, such as photo viewers, audio and video players, and games.
-
MEDIA_AUDIO_TRACK
static final Key MEDIA_AUDIO_TRACK
The Audio Track key.
-
MEDIA_LAST
static final Key MEDIA_LAST
Jumps back to the last-viewed content, program, or other media.
-
MEDIA_SKIP_BACKWARD
static final Key MEDIA_SKIP_BACKWARD
Skips backward to the previous content or program.
-
MEDIA_SKIP_FORWARD
static final Key MEDIA_SKIP_FORWARD
Skips forward to the next content or program.
-
MEDIA_STEP_BACKWARD
static final Key MEDIA_STEP_BACKWARD
Steps backward to the previous content or program.
-
MEDIA_STEP_FORWARD
static final Key MEDIA_STEP_FORWARD
Steps forward to the next content or program.
-
MEDIA_TOP_MENU
static final Key MEDIA_TOP_MENU
Top Menu button; opens the media's main menu, such as on a DVD or Blu-Ray disc.
-
NAVIGATE_IN
static final Key NAVIGATE_IN
Navigates into a submenu or option.
-
NAVIGATE_NEXT
static final Key NAVIGATE_NEXT
Navigates to the next item.
-
NAVIGATE_OUT
static final Key NAVIGATE_OUT
Navigates out of the current screen or menu.
-
NAVIGATE_PREVIOUS
static final Key NAVIGATE_PREVIOUS
Navigates to the previous item.
-
NEXT_FAVORITE_CHANNEL
static final Key NEXT_FAVORITE_CHANNEL
Cycles to the next channel in the favorites list.
-
NEXT_USER_PROFILE
static final Key NEXT_USER_PROFILE
Cycles to the next saved user profile, if this feature is supported and multiple profiles exist.
-
ON_DEMAND
static final Key ON_DEMAND
Opens the user interface for selecting on demand content or programs to watch.
-
PAIRING
static final Key PAIRING
Starts the process of pairing the remote with a device to be controlled.
-
PINP_DOWN
static final Key PINP_DOWN
A button to move the picture-in-picture view downward.
-
PINP_MOVE
static final Key PINP_MOVE
A button to control moving the picture-in-picture view.
-
PINP_TOGGLE
static final Key PINP_TOGGLE
Toggles display of the picture-in-picture view on and off.
-
PINP_UP
static final Key PINP_UP
A button to move the picture-in-picture view upward.
-
PLAY_SPEED_DOWN
static final Key PLAY_SPEED_DOWN
Decreases the media playback rate.
-
PLAY_SPEED_RESET
static final Key PLAY_SPEED_RESET
Returns the media playback rate to normal.
-
PLAY_SPEED_UP
static final Key PLAY_SPEED_UP
Increases the media playback rate.
-
RANDOM_TOGGLE
static final Key RANDOM_TOGGLE
Toggles random media (also known as "shuffle mode") on and off.
-
RC_LOW_BATTERY
static final Key RC_LOW_BATTERY
A code sent when the remote control's battery is low. This doesn't actually correspond to a physical key at all.
-
RECORD_SPEED_NEXT
static final Key RECORD_SPEED_NEXT
Cycles among the available media recording speeds.
-
RF_BYPASS
static final Key RF_BYPASS
Toggles radio frequency (RF) input bypass mode on and off. RF bypass mode passes RF input directly to the RF output without any processing or filtering.
-
SCAN_CHANNELS_TOGGLE
static final Key SCAN_CHANNELS_TOGGLE
Toggles the channel scan mode on and off; this is a mode which flips through channels automatically until the user stops the scan.
-
SCREEN_MODE_NEXT
static final Key SCREEN_MODE_NEXT
Cycles through the available screen display modes.
-
SETTINGS
static final Key SETTINGS
Toggles display of the device's settings screen on and off.
-
SPLIT_SCREEN_TOGGLE
static final Key SPLIT_SCREEN_TOGGLE
Toggles split screen display mode on and off.
-
STB_INPUT
static final Key STB_INPUT
Cycles among input modes on an external set-top box (STB).
-
STB_POWER
static final Key STB_POWER
Toggles on and off an external STB.
-
SUBTITLE
static final Key SUBTITLE
Toggles the display of subtitles on and off if they're available.
-
VIDEO_MODE_NEXT
static final Key VIDEO_MODE_NEXT
Cycles through the available video modes.
-
WINK
static final Key WINK
Causes the device to identify itself in some fashion, such as by flashing a light, briefly changing the brightness of indicator lights, or emitting a tone.
-
ZOOM_TOGGLE
static final Key ZOOM_TOGGLE
Toggles between full-screen and scaled content display, or otherwise change the magnification level.
-
SPEECH_CORRECTION_LIST
static final Key SPEECH_CORRECTION_LIST
Presents a list of possible corrections for a word which was incorrectly identified.
-
SPEECH_INPUT_TOGGLE
static final Key SPEECH_INPUT_TOGGLE
Toggles between dictation mode and command/control mode. This lets the speech engine know whether to interpret spoken words as input text or as commands.
-
CLOSE
static final Key CLOSE
Closes the current document or message. Must not exit the application.
-
NEW
static final Key NEW
Creates a new document or message.
-
OPEN
static final Key OPEN
Opens an existing document or message.This value matches DOM's KeyboardEvent's
event.code.
-
PRINT
static final Key PRINT
Prints the current document or message.
-
SAVE
static final Key SAVE
Saves the current document or message.
-
SPELL_CHECK
static final Key SPELL_CHECK
Starts spell checking the current document.
-
MAIL_FORWARD
static final Key MAIL_FORWARD
Opens the user interface to forward a message.
-
MAIL_REPLY
static final Key MAIL_REPLY
Opens the user interface to reply to a message.
-
MAIL_SEND
static final Key MAIL_SEND
Sends the current message.
-
LAUNCH_CALCULATOR
static final Key LAUNCH_CALCULATOR
TheCalculatorkey. This is often used as a generic application launcher key (APPCOMMAND_LAUNCH_APP2).
-
LAUNCH_CALENDAR
static final Key LAUNCH_CALENDAR
TheCalendarkey.
-
LAUNCH_CONTACTS
static final Key LAUNCH_CONTACTS
TheContactskey.
-
LAUNCH_MAIL
static final Key LAUNCH_MAIL
TheMailkey.This value matches DOM's KeyboardEvent's
event.code.
-
LAUNCH_MEDIA_PLAYER
static final Key LAUNCH_MEDIA_PLAYER
TheMedia Playerkey.
-
LAUNCH_MUSIC_PLAYER
static final Key LAUNCH_MUSIC_PLAYER
TheMusic Playerkey.
-
LAUNCH_MY_COMPUTER
static final Key LAUNCH_MY_COMPUTER
TheMy Computerkey on Windows keyboards. This is often used as a generic application launcher key (APPCOMMAND_LAUNCH_APP1).
-
LAUNCH_PHONE
static final Key LAUNCH_PHONE
ThePhonekey, to open the phone dialer application if one is present.
-
LAUNCH_SCREEN_SAVER
static final Key LAUNCH_SCREEN_SAVER
TheScreen Saverkey.
-
LAUNCH_SPREADSHEET
static final Key LAUNCH_SPREADSHEET
TheSpreadsheetkey.
-
LAUNCH_WEB_BROWSER
static final Key LAUNCH_WEB_BROWSER
TheWeb Browserkey.
-
LAUNCH_WEB_CAM
static final Key LAUNCH_WEB_CAM
TheWebCamkey. Opens the webcam application.
-
LAUNCH_WORD_PROCESSOR
static final Key LAUNCH_WORD_PROCESSOR
TheWord Processorkey. This may be an icon of a specific word processor application, or a generic document icon.
-
LAUNCH_APPLICATION1
static final Key LAUNCH_APPLICATION1
The first generic application launcher button.
-
LAUNCH_APPLICATION2
static final Key LAUNCH_APPLICATION2
The second generic application launcher button.
-
LAUNCH_APPLICATION3
static final Key LAUNCH_APPLICATION3
The third generic application launcher button.
-
LAUNCH_APPLICATION4
static final Key LAUNCH_APPLICATION4
The fourth generic application launcher button.
-
LAUNCH_APPLICATION5
static final Key LAUNCH_APPLICATION5
The fifth generic application launcher button.
-
LAUNCH_APPLICATION6
static final Key LAUNCH_APPLICATION6
The sixth generic application launcher button.
-
LAUNCH_APPLICATION7
static final Key LAUNCH_APPLICATION7
The seventh generic application launcher button.
-
LAUNCH_APPLICATION8
static final Key LAUNCH_APPLICATION8
The eighth generic application launcher button.
-
LAUNCH_APPLICATION9
static final Key LAUNCH_APPLICATION9
The ninth generic application launcher button.
-
LAUNCH_APPLICATION10
static final Key LAUNCH_APPLICATION10
The 10th generic application launcher button.
-
LAUNCH_APPLICATION11
static final Key LAUNCH_APPLICATION11
The 11th generic application launcher button.
-
LAUNCH_APPLICATION12
static final Key LAUNCH_APPLICATION12
The 12th generic application launcher button.
-
LAUNCH_APPLICATION13
static final Key LAUNCH_APPLICATION13
The 13th generic application launcher button.
-
LAUNCH_APPLICATION14
static final Key LAUNCH_APPLICATION14
The 14th generic application launcher button.
-
LAUNCH_APPLICATION15
static final Key LAUNCH_APPLICATION15
The 15th generic application launcher button.
-
LAUNCH_APPLICATION16
static final Key LAUNCH_APPLICATION16
The 16th generic application launcher button.
-
BROWSER_BACK
static final Key BROWSER_BACK
Navigates to the previous content or page in the current Web view's history. Some laptops place this key to the left of the↑key.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_FAVORITES
static final Key BROWSER_FAVORITES
Opens the user's list of bookmarks/favorites.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_FORWARD
static final Key BROWSER_FORWARD
Navigates to the next content or page in the current Web view's history. Some laptops place this key to the right of the↑key.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_HOME
static final Key BROWSER_HOME
Navigates to the user's preferred home page.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_REFRESH
static final Key BROWSER_REFRESH
Refreshes the current page or content.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_SEARCH
static final Key BROWSER_SEARCH
Activates the user's preferred search engine or the search interface within their browser.This value matches DOM's KeyboardEvent's
event.code.
-
BROWSER_STOP
static final Key BROWSER_STOP
Stops loading the currently displayed Web view or content.This value matches DOM's KeyboardEvent's
event.code.
-
DECIMAL
static final Key DECIMAL
The decimal point key (typically.or,) depending on the region.
-
KEY11
static final Key KEY11
The11key found on certain media numeric keypads.
-
KEY12
static final Key KEY12
The12key found on certain media numeric keypads.
-
MULTIPLY
static final Key MULTIPLY
The numeric keypad's multiplication key,*.
-
ADD
static final Key ADD
The numeric keypad's addition key,+.
-
DIVIDE
static final Key DIVIDE
The numeric keypad's division key, /.
-
SUBTRACT
static final Key SUBTRACT
The numeric keypad's subtraction key, -.
-
SEPARATOR
static final Key SEPARATOR
The numeric keypad's places separator character (in the United States, this is a comma, but elsewhere it is frequently a period).
-
BACKQUOTE
static final Key BACKQUOTE
`~on a US keyboard. This is the半角/全角/漢字( hankaku/zenkaku/kanji ) key on Japanese keyboardsThis value matches DOM's KeyboardEvent's
event.code.
-
BACKSLASH
static final Key BACKSLASH
Used for both the US\|(on the 101-key layout) and also for the keylocated between the"andEnterkeys on row C of the 102-, 104- and 106-key layouts. Labelled#~on a UK (102) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
BRACKET_LEFT
static final Key BRACKET_LEFT
[{on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
BRACKET_RIGHT
static final Key BRACKET_RIGHT
]}on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
COMMA
static final Key COMMA
,<on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_0
static final Key DIGIT_0
0)on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_1
static final Key DIGIT_1
1!on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_2
static final Key DIGIT_2
2@on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_3
static final Key DIGIT_3
3#on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_4
static final Key DIGIT_4
4$on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_5
static final Key DIGIT_5
5%on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_6
static final Key DIGIT_6
6^on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_7
static final Key DIGIT_7
7&on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_8
static final Key DIGIT_8
8*on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
DIGIT_9
static final Key DIGIT_9
9(on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
EQUAL
static final Key EQUAL
=+on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
INTL_BACKSLASH
static final Key INTL_BACKSLASH
Located between the leftShiftandZkeys.Labelled\|on a UK keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
INTL_RO
static final Key INTL_RO
Located between the/and rightShiftkeys.Labelled\ろ( ro ) on a Japanese keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
INTL_YEN
static final Key INTL_YEN
Located between the=andBackspacekeys.Labelled¥( yen ) on a Japanese keyboard.\/on a Russian keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_A
static final Key KEY_A
aon a US keyboard.Labelledqon an AZERTY (e.g., French) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_B
static final Key KEY_B
bon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_C
static final Key KEY_C
con a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_D
static final Key KEY_D
don a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_E
static final Key KEY_E
eon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_F
static final Key KEY_F
fon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_G
static final Key KEY_G
gon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_H
static final Key KEY_H
hon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_I
static final Key KEY_I
ion a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_J
static final Key KEY_J
jon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_K
static final Key KEY_K
kon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_L
static final Key KEY_L
lon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_M
static final Key KEY_M
mon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_N
static final Key KEY_N
non a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_O
static final Key KEY_O
oon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_P
static final Key KEY_P
pon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_Q
static final Key KEY_Q
qon a US keyboard.Labelledaon an AZERTY (e.g., French) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_R
static final Key KEY_R
ron a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_S
static final Key KEY_S
son a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_T
static final Key KEY_T
ton a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_U
static final Key KEY_U
uon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_V
static final Key KEY_V
von a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_W
static final Key KEY_W
won a US keyboard.Labelledzon an AZERTY (e.g., French) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_X
static final Key KEY_X
xon a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_Y
static final Key KEY_Y
yon a US keyboard.Labelledzon a QWERTZ (e.g., German) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
KEY_Z
static final Key KEY_Z
zon a US keyboard.Labelledwon an AZERTY (e.g., French) keyboard, andyon a QWERTZ (e.g., German) keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
MINUS
static final Key MINUS
-_on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
PERIOD
static final Key PERIOD
.>on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
QUOTE
static final Key QUOTE
'"on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
SEMICOLON
static final Key SEMICOLON
;:on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
SLASH
static final Key SLASH
/?on a US keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
ALT_LEFT
static final Key ALT_LEFT
Alt,Optionor⌥.This value matches DOM's KeyboardEvent's
event.code.
-
ALT_RIGHT
static final Key ALT_RIGHT
Alt,Optionor⌥.This is labelledAltGrkey on many keyboard layouts.This value matches DOM's KeyboardEvent's
event.code.
-
CONTROL_LEFT
static final Key CONTROL_LEFT
Controlor⌃This value matches DOM's KeyboardEvent's
event.code.
-
CONTROL_RIGHT
static final Key CONTROL_RIGHT
Controlor⌃This value matches DOM's KeyboardEvent's
event.code.
-
META_LEFT
static final Key META_LEFT
The Windows,⌘,Commandor other OS symbol key.This value matches DOM's KeyboardEvent's
event.code.
-
META_RIGHT
static final Key META_RIGHT
The Windows,⌘,Commandor other OS symbol key.This value matches DOM's KeyboardEvent's
event.code.
-
SHIFT_LEFT
static final Key SHIFT_LEFT
Shiftor⇧This value matches DOM's KeyboardEvent's
event.code.
-
SHIFT_RIGHT
static final Key SHIFT_RIGHT
Shiftor⇧This value matches DOM's KeyboardEvent's
event.code.
-
LANG_1
static final Key LANG_1
Korean: HangulMode한/영( han/yeong ) Japanese (Mac keyboard):かな( kana )This value matches DOM's KeyboardEvent's
event.code.
-
LANG_2
static final Key LANG_2
Korean: Hanja한자( hanja ) Japanese (Mac keyboard):英数( eisu )This value matches DOM's KeyboardEvent's
event.code.
-
LANG_3
static final Key LANG_3
Japanese (word-processing keyboard): KatakanaThis value matches DOM's KeyboardEvent's
event.code.
-
LANG_4
static final Key LANG_4
Japanese (word-processing keyboard): HiraganaThis value matches DOM's KeyboardEvent's
event.code.
-
LANG_5
static final Key LANG_5
Japanese (word-processing keyboard): Zenkaku/HankakuThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_0
static final Key NUMPAD_0
0 Inson a keyboard0on a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_1
static final Key NUMPAD_1
1 Endon a keyboard1or1 QZon a phone orremote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_2
static final Key NUMPAD_2
2 ↓on a keyboard2 ABCon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_3
static final Key NUMPAD_3
3 PgDnon a keyboard3 DEFon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_4
static final Key NUMPAD_4
4 ←on a keyboard4 GHIon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_5
static final Key NUMPAD_5
5on a keyboard5 JKLon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_6
static final Key NUMPAD_6
6 →on a keyboard6 MNOon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_7
static final Key NUMPAD_7
7 Homeon a keyboard7 PQRSor7 PRSon a phoneor remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_8
static final Key NUMPAD_8
8 ↑on a keyboard8 TUVon a phone or remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_9
static final Key NUMPAD_9
9 PgUpon a keyboard9 WXYZor9 WXYon a phoneor remote controlThis value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_ADD
static final Key NUMPAD_ADD
+This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_BACKSPACE
static final Key NUMPAD_BACKSPACE
Found on the Microsoft Natural Keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_CLEAR
static final Key NUMPAD_CLEAR
CorAC(All Clear). Also for use with numpads that have aClearkey that is separate from theNumLockkey. On the Mac, the numpadClearkey should always be encoded as " NumLock " .This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_CLEAR_ENTRY
static final Key NUMPAD_CLEAR_ENTRY
CE(Clear Entry)This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_COMMA
static final Key NUMPAD_COMMA
,(thousands separator). For locales where the thousands separatoris a "." (e.g., Brazil), this key may generate a..This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_DECIMAL
static final Key NUMPAD_DECIMAL
. Del. For locales where the decimal separator is "," (e.g.,Brazil), this key may generate a,.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_DIVIDE
static final Key NUMPAD_DIVIDE
/This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_ENTER
static final Key NUMPAD_ENTER
This value matches DOM's KeyboardEvent'sevent.code.
-
NUMPAD_EQUAL
static final Key NUMPAD_EQUAL
=This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_HASH
static final Key NUMPAD_HASH
#on a phone or remote control device. This key is typically foundbelow the9key and to the right of the0key.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MEMORY_ADD
static final Key NUMPAD_MEMORY_ADD
M+Add current entry to the value stored in memory.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MEMORY_CLEAR
static final Key NUMPAD_MEMORY_CLEAR
MCClear the value stored in memory.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MEMORY_RECALL
static final Key NUMPAD_MEMORY_RECALL
MRReplace the current entry with the value stored in memory.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MEMORY_STORE
static final Key NUMPAD_MEMORY_STORE
MSReplace the value stored in memory with the current entry.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MEMORY_SUBTRACT
static final Key NUMPAD_MEMORY_SUBTRACT
M-Subtract current entry from the value stored in memory.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_MULTIPLY
static final Key NUMPAD_MULTIPLY
*on a keyboard. For use with numpads that provide mathematicaloperations (+,-,*and/). Use " NumpadStar " for the*key on phones and remote controls.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_PAREN_LEFT
static final Key NUMPAD_PAREN_LEFT
(Found on the Microsoft Natural Keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_PAREN_RIGHT
static final Key NUMPAD_PAREN_RIGHT
)Found on the Microsoft Natural Keyboard.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_STAR
static final Key NUMPAD_STAR
*on a phone or remote control device.This key is typically found below the7key and to the left of the0key. Use " NumpadMultiply " for the*key on numeric keypads.This value matches DOM's KeyboardEvent's
event.code.
-
NUMPAD_SUBTRACT
static final Key NUMPAD_SUBTRACT
-This value matches DOM's KeyboardEvent's
event.code.
-
LAUNCH_APP_1
static final Key LAUNCH_APP_1
Sometimes labelledMy Computeron the keyboardThis value matches DOM's KeyboardEvent's
event.code.
-
LAUNCH_APP_2
static final Key LAUNCH_APP_2
Sometimes labelledCalculatoron the keyboardThis value matches DOM's KeyboardEvent's
event.code.
-
MEDIA_SELECT
static final Key MEDIA_SELECT
This value matches DOM's KeyboardEvent'sevent.code.
-
SLEEP
static final Key SLEEP
This value matches DOM's KeyboardEvent'sevent.code.
-
TURBO
static final Key TURBO
This value matches DOM's KeyboardEvent'sevent.code.
-
ABORT
static final Key ABORT
This value matches DOM's KeyboardEvent'sevent.code.
-
RESUME
static final Key RESUME
This value matches DOM's KeyboardEvent'sevent.code.
-
SUSPEND
static final Key SUSPEND
This value matches DOM's KeyboardEvent'sevent.code.
-
NONE
static final Key NONE
This value is reserved for corner cases of no key value present in event e.g. when browser autosuggest is used.
-
-
Method Detail
-
of
static Key of(String key, String... additionalKeys)
Returns aKeyinstance for a printable representation of the key.The optional
additionalKeysparameter can be used to create an instance which will match additional printable representations of the same key, in the rare cases where browsers don't agree.See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
- Parameters:
key- the printable representation of the key, notnullnor emptyadditionalKeys- additional printable representations of the same key- Returns:
- the
Keyinstance
-
getKeys
List<String> getKeys()
Returns the list (with at least one element) of printable representations of the key, which should reflect thekeyproperty in the JavaScriptKeyboardEvent.See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key
- Returns:
- the list of printable representations of the key
-
matches
default boolean matches(String key)
Checks ifkeyis a printable representation for this instance.- Parameters:
key- a printable representation of a key- Returns:
- true, if
keyis a printable representation for this instance
-
isModifier
static boolean isModifier(Key key)
Returns whether the specified key is a modifier or not.- Parameters:
key- aKeyinstance.- Returns:
- true if the key argument is a modifier, otherwise false.
- See Also:
KeyModifier
-
-