package js.html
Available on js
KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard.
Documentation KeyboardEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
staticinlineread onlyDOM_KEY_LOCATION_LEFT:Int = 1staticinlineread onlyDOM_KEY_LOCATION_NUMPAD:Int = 3staticinlineread onlyDOM_KEY_LOCATION_RIGHT:Int = 2staticinlineread onlyDOM_KEY_LOCATION_STANDARD:Int = 0staticinlineread onlyDOM_VK_0:Int = 48staticinlineread onlyDOM_VK_1:Int = 49staticinlineread onlyDOM_VK_2:Int = 50staticinlineread onlyDOM_VK_3:Int = 51staticinlineread onlyDOM_VK_4:Int = 52staticinlineread onlyDOM_VK_5:Int = 53staticinlineread onlyDOM_VK_6:Int = 54staticinlineread onlyDOM_VK_7:Int = 55staticinlineread onlyDOM_VK_8:Int = 56staticinlineread onlyDOM_VK_9:Int = 57staticinlineread onlyDOM_VK_A:Int = 65staticinlineread onlyDOM_VK_ACCEPT:Int = 30staticinlineread onlyDOM_VK_ADD:Int = 107staticinlineread onlyDOM_VK_ALT:Int = 18staticinlineread onlyDOM_VK_ALTGR:Int = 225staticinlineread onlyDOM_VK_AMPERSAND:Int = 166staticinlineread onlyDOM_VK_ASTERISK:Int = 170staticinlineread onlyDOM_VK_AT:Int = 64staticinlineread onlyDOM_VK_ATTN:Int = 246staticinlineread onlyDOM_VK_B:Int = 66staticinlineread onlyDOM_VK_BACK_QUOTE:Int = 192staticinlineread onlyDOM_VK_BACK_SLASH:Int = 220staticinlineread onlyDOM_VK_BACK_SPACE:Int = 8staticinlineread onlyDOM_VK_C:Int = 67staticinlineread onlyDOM_VK_CANCEL:Int = 3staticinlineread onlyDOM_VK_CAPS_LOCK:Int = 20staticinlineread onlyDOM_VK_CIRCUMFLEX:Int = 160staticinlineread onlyDOM_VK_CLEAR:Int = 12staticinlineread onlyDOM_VK_CLOSE_BRACKET:Int = 221staticinlineread onlyDOM_VK_CLOSE_CURLY_BRACKET:Int = 175staticinlineread onlyDOM_VK_CLOSE_PAREN:Int = 169staticinlineread onlyDOM_VK_COLON:Int = 58staticinlineread onlyDOM_VK_COMMA:Int = 188staticinlineread onlyDOM_VK_CONTEXT_MENU:Int = 93staticinlineread onlyDOM_VK_CONTROL:Int = 17staticinlineread onlyDOM_VK_CONVERT:Int = 28staticinlineread onlyDOM_VK_CRSEL:Int = 247staticinlineread onlyDOM_VK_D:Int = 68staticinlineread onlyDOM_VK_DECIMAL:Int = 110staticinlineread onlyDOM_VK_DELETE:Int = 46staticinlineread onlyDOM_VK_DIVIDE:Int = 111staticinlineread onlyDOM_VK_DOLLAR:Int = 164staticinlineread onlyDOM_VK_DOUBLE_QUOTE:Int = 162staticinlineread onlyDOM_VK_DOWN:Int = 40staticinlineread onlyDOM_VK_E:Int = 69staticinlineread onlyDOM_VK_EISU:Int = 22staticinlineread onlyDOM_VK_END:Int = 35staticinlineread onlyDOM_VK_EQUALS:Int = 61staticinlineread onlyDOM_VK_EREOF:Int = 249staticinlineread onlyDOM_VK_ESCAPE:Int = 27staticinlineread onlyDOM_VK_EXCLAMATION:Int = 161staticinlineread onlyDOM_VK_EXECUTE:Int = 43staticinlineread onlyDOM_VK_EXSEL:Int = 248staticinlineread onlyDOM_VK_F:Int = 70staticinlineread onlyDOM_VK_F1:Int = 112staticinlineread onlyDOM_VK_F10:Int = 121staticinlineread onlyDOM_VK_F11:Int = 122staticinlineread onlyDOM_VK_F12:Int = 123staticinlineread onlyDOM_VK_F13:Int = 124staticinlineread onlyDOM_VK_F14:Int = 125staticinlineread onlyDOM_VK_F15:Int = 126staticinlineread onlyDOM_VK_F16:Int = 127staticinlineread onlyDOM_VK_F17:Int = 128staticinlineread onlyDOM_VK_F18:Int = 129staticinlineread onlyDOM_VK_F19:Int = 130staticinlineread onlyDOM_VK_F2:Int = 113staticinlineread onlyDOM_VK_F20:Int = 131staticinlineread onlyDOM_VK_F21:Int = 132staticinlineread onlyDOM_VK_F22:Int = 133staticinlineread onlyDOM_VK_F23:Int = 134staticinlineread onlyDOM_VK_F24:Int = 135staticinlineread onlyDOM_VK_F3:Int = 114staticinlineread onlyDOM_VK_F4:Int = 115staticinlineread onlyDOM_VK_F5:Int = 116staticinlineread onlyDOM_VK_F6:Int = 117staticinlineread onlyDOM_VK_F7:Int = 118staticinlineread onlyDOM_VK_F8:Int = 119staticinlineread onlyDOM_VK_F9:Int = 120staticinlineread onlyDOM_VK_FINAL:Int = 24staticinlineread onlyDOM_VK_G:Int = 71staticinlineread onlyDOM_VK_GREATER_THAN:Int = 62staticinlineread onlyDOM_VK_H:Int = 72staticinlineread onlyDOM_VK_HANGUL:Int = 21staticinlineread onlyDOM_VK_HANJA:Int = 25staticinlineread onlyDOM_VK_HASH:Int = 163staticinlineread onlyDOM_VK_HELP:Int = 6staticinlineread onlyDOM_VK_HOME:Int = 36staticinlineread onlyDOM_VK_HYPHEN_MINUS:Int = 173staticinlineread onlyDOM_VK_I:Int = 73staticinlineread onlyDOM_VK_INSERT:Int = 45staticinlineread onlyDOM_VK_J:Int = 74staticinlineread onlyDOM_VK_JUNJA:Int = 23staticinlineread onlyDOM_VK_K:Int = 75staticinlineread onlyDOM_VK_KANA:Int = 21staticinlineread onlyDOM_VK_KANJI:Int = 25staticinlineread onlyDOM_VK_L:Int = 76staticinlineread onlyDOM_VK_LEFT:Int = 37staticinlineread onlyDOM_VK_LESS_THAN:Int = 60staticinlineread onlyDOM_VK_M:Int = 77staticinlineread onlyDOM_VK_META:Int = 224staticinlineread onlyDOM_VK_MODECHANGE:Int = 31staticinlineread onlyDOM_VK_MULTIPLY:Int = 106staticinlineread onlyDOM_VK_N:Int = 78staticinlineread onlyDOM_VK_NONCONVERT:Int = 29staticinlineread onlyDOM_VK_NUMPAD0:Int = 96staticinlineread onlyDOM_VK_NUMPAD1:Int = 97staticinlineread onlyDOM_VK_NUMPAD2:Int = 98staticinlineread onlyDOM_VK_NUMPAD3:Int = 99staticinlineread onlyDOM_VK_NUMPAD4:Int = 100staticinlineread onlyDOM_VK_NUMPAD5:Int = 101staticinlineread onlyDOM_VK_NUMPAD6:Int = 102staticinlineread onlyDOM_VK_NUMPAD7:Int = 103staticinlineread onlyDOM_VK_NUMPAD8:Int = 104staticinlineread onlyDOM_VK_NUMPAD9:Int = 105staticinlineread onlyDOM_VK_NUM_LOCK:Int = 144staticinlineread onlyDOM_VK_O:Int = 79staticinlineread onlyDOM_VK_OPEN_BRACKET:Int = 219staticinlineread onlyDOM_VK_OPEN_CURLY_BRACKET:Int = 174staticinlineread onlyDOM_VK_OPEN_PAREN:Int = 168staticinlineread onlyDOM_VK_P:Int = 80staticinlineread onlyDOM_VK_PA1:Int = 253staticinlineread onlyDOM_VK_PAGE_DOWN:Int = 34staticinlineread onlyDOM_VK_PAGE_UP:Int = 33staticinlineread onlyDOM_VK_PAUSE:Int = 19staticinlineread onlyDOM_VK_PERCENT:Int = 165staticinlineread onlyDOM_VK_PERIOD:Int = 190staticinlineread onlyDOM_VK_PIPE:Int = 172staticinlineread onlyDOM_VK_PLAY:Int = 250staticinlineread onlyDOM_VK_PLUS:Int = 171staticinlineread onlyDOM_VK_PRINT:Int = 42staticinlineread onlyDOM_VK_PRINTSCREEN:Int = 44staticinlineread onlyDOM_VK_PROCESSKEY:Int = 229staticinlineread onlyDOM_VK_Q:Int = 81staticinlineread onlyDOM_VK_QUESTION_MARK:Int = 63staticinlineread onlyDOM_VK_QUOTE:Int = 222staticinlineread onlyDOM_VK_R:Int = 82staticinlineread onlyDOM_VK_RETURN:Int = 13staticinlineread onlyDOM_VK_RIGHT:Int = 39staticinlineread onlyDOM_VK_S:Int = 83staticinlineread onlyDOM_VK_SCROLL_LOCK:Int = 145staticinlineread onlyDOM_VK_SELECT:Int = 41staticinlineread onlyDOM_VK_SEMICOLON:Int = 59staticinlineread onlyDOM_VK_SEPARATOR:Int = 108staticinlineread onlyDOM_VK_SHIFT:Int = 16staticinlineread onlyDOM_VK_SLASH:Int = 191staticinlineread onlyDOM_VK_SLEEP:Int = 95staticinlineread onlyDOM_VK_SPACE:Int = 32staticinlineread onlyDOM_VK_SUBTRACT:Int = 109staticinlineread onlyDOM_VK_T:Int = 84staticinlineread onlyDOM_VK_TAB:Int = 9staticinlineread onlyDOM_VK_TILDE:Int = 176staticinlineread onlyDOM_VK_U:Int = 85staticinlineread onlyDOM_VK_UNDERSCORE:Int = 167staticinlineread onlyDOM_VK_UP:Int = 38staticinlineread onlyDOM_VK_V:Int = 86staticinlineread onlyDOM_VK_VOLUME_DOWN:Int = 182staticinlineread onlyDOM_VK_VOLUME_MUTE:Int = 181staticinlineread onlyDOM_VK_VOLUME_UP:Int = 183staticinlineread onlyDOM_VK_W:Int = 87staticinlineread onlyDOM_VK_WIN:Int = 91staticinlineread onlyDOM_VK_WIN_ICO_00:Int = 228staticinlineread onlyDOM_VK_WIN_ICO_CLEAR:Int = 230staticinlineread onlyDOM_VK_WIN_ICO_HELP:Int = 227staticinlineread onlyDOM_VK_WIN_OEM_ATTN:Int = 240staticinlineread onlyDOM_VK_WIN_OEM_AUTO:Int = 243staticinlineread onlyDOM_VK_WIN_OEM_BACKTAB:Int = 245staticinlineread onlyDOM_VK_WIN_OEM_CLEAR:Int = 254staticinlineread onlyDOM_VK_WIN_OEM_COPY:Int = 242staticinlineread onlyDOM_VK_WIN_OEM_CUSEL:Int = 239staticinlineread onlyDOM_VK_WIN_OEM_ENLW:Int = 244staticinlineread onlyDOM_VK_WIN_OEM_FINISH:Int = 241staticinlineread onlyDOM_VK_WIN_OEM_FJ_JISHO:Int = 146staticinlineread onlyDOM_VK_WIN_OEM_FJ_LOYA:Int = 149staticinlineread onlyDOM_VK_WIN_OEM_FJ_MASSHOU:Int = 147staticinlineread onlyDOM_VK_WIN_OEM_FJ_ROYA:Int = 150staticinlineread onlyDOM_VK_WIN_OEM_FJ_TOUROKU:Int = 148staticinlineread onlyDOM_VK_WIN_OEM_JUMP:Int = 234staticinlineread onlyDOM_VK_WIN_OEM_PA1:Int = 235staticinlineread onlyDOM_VK_WIN_OEM_PA2:Int = 236staticinlineread onlyDOM_VK_WIN_OEM_PA3:Int = 237staticinlineread onlyDOM_VK_WIN_OEM_RESET:Int = 233staticinlineread onlyDOM_VK_WIN_OEM_WSCTRL:Int = 238staticinlineread onlyDOM_VK_X:Int = 88staticinlineread onlyDOM_VK_Y:Int = 89staticinlineread onlyDOM_VK_Z:Int = 90staticinlineread onlyDOM_VK_ZOOM:Int = 251new(typeArg:String, ?keyboardEventInitDict:Null<KeyboardEventInit>)Throws:
null |
DOMError |
|---|
read onlyaltKey:BoolReturns a Boolean that is true if the Alt ( Option or ⌥ on OS X) key was active when the key event was generated.
read onlycharCode:IntReturns a Number representing the Unicode reference number of the key; this attribute is used only by the keypress event. For keys whose char attribute contains multiple characters, this is the Unicode value of the first character in that attribute. In Firefox 26 this returns codes for printable characters. Warning: This attribute is deprecated; you should use KeyboardEvent.key instead, if available.
read onlycode:StringReturns a DOMString with the code value of the key represented by the event.
read onlyctrlKey:BoolReturns a Boolean that is true if the Ctrl key was active when the key event was generated.
read onlyisComposing:BoolReturns a Boolean that is true if the event is fired between after compositionstart and before compositionend.
read onlykey:StringReturns a DOMString representing the key value of the key represented by the event.
read onlykeyCode:IntReturns a Number representing a system and implementation dependent numerical code identifying the unmodified value of the pressed key. Warning: This attribute is deprecated; you should use KeyboardEvent.key instead, if available.
read onlylocation:IntReturns a Number representing the location of the key on the keyboard or other input device.
read onlymetaKey:BoolReturns a Boolean that is true if the Meta key (on Mac keyboards, the ⌘ Command key; on Windows keyboards, the Windows key (⊞)) was active when the key event was generated.
read onlyrepeat:BoolReturns a Boolean that is true if the key is being held down such that it is automatically repeating.
read onlyshiftKey:BoolReturns a Boolean that is true if the Shift key was active when the key event was generated.
getModifierState(key:String):BoolReturns a Boolean indicating if a modifier key such as Alt, Shift, Ctrl, or Meta, was pressed when the event was created.
initKeyEvent(type:String, canBubble:Bool = false, cancelable:Bool = false, ?view:Window, ctrlKey:Bool = false, altKey:Bool = false, shiftKey:Bool = false, metaKey:Bool = false, keyCode:Int = 0, charCode:Int = 0):VoidInitializes a KeyboardEvent object. This was implemented only by Firefox, and is no longer supported even there; instead, you should use the KeyboardEvent.KeyboardEvent constructor.
initKeyboardEvent(typeArg:String, bubblesArg:Bool = false, cancelableArg:Bool = false, ?viewArg:Window, keyArg:String = "", locationArg:Int = 0, ctrlKey:Bool = false, altKey:Bool = false, shiftKey:Bool = false, metaKey:Bool = false):VoidInitializes a KeyboardEvent object. This is now deprecated. You should instead use the KeyboardEvent.KeyboardEvent constructor.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/KeyboardEvent.html