Class KeyboardEvent
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.event.Event
-
- org.htmlunit.javascript.host.event.UIEvent
-
- org.htmlunit.javascript.host.event.KeyboardEvent
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.htmlunit.corejs.javascript.ConstProperties,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
public class KeyboardEvent extends UIEvent
JavaScript object representing a Keyboard Event. For general information on which properties and functions should be supported, see DOM Level 3 Events.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intcharCode_The Unicode reference number of the key.private java.lang.Stringcode_The code value of the physical key represented by the event.static intDOM_KEY_LOCATION_LEFTConstant forDOM_KEY_LOCATION_LEFT.static intDOM_KEY_LOCATION_NUMPADConstant forDOM_KEY_LOCATION_NUMPAD.static intDOM_KEY_LOCATION_RIGHTConstant forDOM_KEY_LOCATION_RIGHT.static intDOM_KEY_LOCATION_STANDARDConstant forDOM_KEY_LOCATION_STANDARD.static intDOM_VK_0Constant forDOM_VK_0.static intDOM_VK_1Constant forDOM_VK_1.static intDOM_VK_2Constant forDOM_VK_2.static intDOM_VK_3Constant forDOM_VK_3.static intDOM_VK_4Constant forDOM_VK_4.static intDOM_VK_5Constant forDOM_VK_5.static intDOM_VK_6Constant forDOM_VK_6.static intDOM_VK_7Constant forDOM_VK_7.static intDOM_VK_8Constant forDOM_VK_8.static intDOM_VK_9Constant forDOM_VK_9.static intDOM_VK_AConstant forDOM_VK_A.static intDOM_VK_ACCEPTConstant forDOM_VK_ACCEPT.static intDOM_VK_ADDConstant forDOM_VK_ADD.static intDOM_VK_ALTConstant forDOM_VK_ALT.static intDOM_VK_ALTGRConstant forDOM_VK_ALTGR.static intDOM_VK_AMPERSANDConstant forDOM_VK_AMPERSAND.static intDOM_VK_ASTERISKConstant forDOM_VK_ASTERISK.static intDOM_VK_ATConstant forDOM_VK_AT.static intDOM_VK_ATTNConstant forDOM_VK_ATTN.static intDOM_VK_BConstant forDOM_VK_B.static intDOM_VK_BACK_QUOTEConstant forDOM_VK_BACK_QUOTE.static intDOM_VK_BACK_SLASHConstant forDOM_VK_BACK_SLASH.static intDOM_VK_BACK_SPACEConstant forDOM_VK_BACK_SPACE.static intDOM_VK_CConstant forDOM_VK_C.static intDOM_VK_CANCELConstant forDOM_VK_CANCEL.static intDOM_VK_CAPS_LOCKConstant forDOM_VK_CAPS_LOCK.static intDOM_VK_CIRCUMFLEXConstant forDOM_VK_CIRCUMFLEX.static intDOM_VK_CLEARConstant forDOM_VK_CLEAR.static intDOM_VK_CLOSE_BRACKETConstant forDOM_VK_CLOSE_BRACKET.static intDOM_VK_CLOSE_CURLY_BRACKETConstant forDOM_VK_CLOSE_CURLY_BRACKET.static intDOM_VK_CLOSE_PARENConstant forDOM_VK_CLOSE_PAREN.static intDOM_VK_COLONConstant forDOM_VK_COLON.static intDOM_VK_COMMAConstant forDOM_VK_COMMA.static intDOM_VK_CONTEXT_MENUConstant forDOM_VK_CONTEXT_MENU.static intDOM_VK_CONTROLConstant forDOM_VK_CONTROL.static intDOM_VK_CONVERTConstant forDOM_VK_CONVERT.static intDOM_VK_CRSELConstant forDOM_VK_CRSEL.static intDOM_VK_DConstant forDOM_VK_D.static intDOM_VK_DECIMALConstant forDOM_VK_DECIMAL.static intDOM_VK_DELETEConstant forDOM_VK_DELETE.static intDOM_VK_DIVIDEConstant forDOM_VK_DIVIDE.static intDOM_VK_DOLLARConstant forDOM_VK_DOLLAR.static intDOM_VK_DOUBLE_QUOTEConstant forDOM_VK_DOUBLE_QUOTE.static intDOM_VK_DOWNConstant forDOM_VK_DOWN.static intDOM_VK_EConstant forDOM_VK_E.static intDOM_VK_EISUConstant forDOM_VK_EISU.static intDOM_VK_ENDConstant forDOM_VK_END.static intDOM_VK_EQUALSConstant forDOM_VK_EQUALS.static intDOM_VK_EREOFConstant forDOM_VK_EREOF.static intDOM_VK_ESCAPEConstant forDOM_VK_ESCAPE.static intDOM_VK_EXCLAMATIONConstant forDOM_VK_EXCLAMATION.static intDOM_VK_EXECUTEConstant forDOM_VK_EXECUTE.static intDOM_VK_EXSELConstant forDOM_VK_EXSEL.static intDOM_VK_FConstant forDOM_VK_F.static intDOM_VK_F1Constant forDOM_VK_F1.static intDOM_VK_F10Constant forDOM_VK_F10.static intDOM_VK_F11Constant forDOM_VK_F11.static intDOM_VK_F12Constant forDOM_VK_F12.static intDOM_VK_F13Constant forDOM_VK_F13.static intDOM_VK_F14Constant forDOM_VK_F14.static intDOM_VK_F15Constant forDOM_VK_F15.static intDOM_VK_F16Constant forDOM_VK_F16.static intDOM_VK_F17Constant forDOM_VK_F17.static intDOM_VK_F18Constant forDOM_VK_F18.static intDOM_VK_F19Constant forDOM_VK_F19.static intDOM_VK_F2Constant forDOM_VK_F2.static intDOM_VK_F20Constant forDOM_VK_F20.static intDOM_VK_F21Constant forDOM_VK_F21.static intDOM_VK_F22Constant forDOM_VK_F22.static intDOM_VK_F23Constant forDOM_VK_F23.static intDOM_VK_F24Constant forDOM_VK_F24.static intDOM_VK_F3Constant forDOM_VK_F3.static intDOM_VK_F4Constant forDOM_VK_F4.static intDOM_VK_F5Constant forDOM_VK_F5.static intDOM_VK_F6Constant forDOM_VK_F6.static intDOM_VK_F7Constant forDOM_VK_F7.static intDOM_VK_F8Constant forDOM_VK_F8.static intDOM_VK_F9Constant forDOM_VK_F9.static intDOM_VK_FINALConstant forDOM_VK_FINAL.static intDOM_VK_GConstant forDOM_VK_G.static intDOM_VK_GREATER_THANConstant forDOM_VK_GREATER_THAN.static intDOM_VK_HConstant forDOM_VK_H.static intDOM_VK_HANGULConstant forDOM_VK_HANGUL.static intDOM_VK_HANJAConstant forDOM_VK_HANJA.static intDOM_VK_HASHConstant forDOM_VK_HASH.static intDOM_VK_HELPConstant forDOM_VK_HELP.static intDOM_VK_HOMEConstant forDOM_VK_HOME.static intDOM_VK_HYPHEN_MINUSConstant forDOM_VK_HYPHEN_MINUS.static intDOM_VK_IConstant forDOM_VK_I.static intDOM_VK_INSERTConstant forDOM_VK_INSERT.static intDOM_VK_JConstant forDOM_VK_J.static intDOM_VK_JUNJAConstant forDOM_VK_JUNJA.static intDOM_VK_KConstant forDOM_VK_K.static intDOM_VK_KANAConstant forDOM_VK_KANA.static intDOM_VK_KANJIConstant forDOM_VK_KANJI.static intDOM_VK_LConstant forDOM_VK_L.static intDOM_VK_LEFTConstant forDOM_VK_LEFT.static intDOM_VK_LESS_THANConstant forDOM_VK_LESS_THAN.static intDOM_VK_MConstant forDOM_VK_M.static intDOM_VK_METAConstant forDOM_VK_META.static intDOM_VK_MODECHANGEConstant forDOM_VK_MODECHANGE.static intDOM_VK_MULTIPLYConstant forDOM_VK_MULTIPLY.static intDOM_VK_NConstant forDOM_VK_N.static intDOM_VK_NONCONVERTConstant forDOM_VK_NONCONVERT.static intDOM_VK_NUM_LOCKConstant forDOM_VK_NUM_LOCK.static intDOM_VK_NUMPAD0Constant forDOM_VK_NUMPAD0.static intDOM_VK_NUMPAD1Constant forDOM_VK_NUMPAD1.static intDOM_VK_NUMPAD2Constant forDOM_VK_NUMPAD2.static intDOM_VK_NUMPAD3Constant forDOM_VK_NUMPAD3.static intDOM_VK_NUMPAD4Constant forDOM_VK_NUMPAD4.static intDOM_VK_NUMPAD5Constant forDOM_VK_NUMPAD5.static intDOM_VK_NUMPAD6Constant forDOM_VK_NUMPAD6.static intDOM_VK_NUMPAD7Constant forDOM_VK_NUMPAD7.static intDOM_VK_NUMPAD8Constant forDOM_VK_NUMPAD8.static intDOM_VK_NUMPAD9Constant forDOM_VK_NUMPAD9.static intDOM_VK_OConstant forDOM_VK_O.static intDOM_VK_OPEN_BRACKETConstant forDOM_VK_OPEN_BRACKET.static intDOM_VK_OPEN_CURLY_BRACKETConstant forDOM_VK_OPEN_CURLY_BRACKET.static intDOM_VK_OPEN_PARENConstant forDOM_VK_OPEN_PAREN.static intDOM_VK_PConstant forDOM_VK_P.static intDOM_VK_PA1Constant forDOM_VK_PA1.static intDOM_VK_PAGE_DOWNConstant forDOM_VK_PAGE_DOWN.static intDOM_VK_PAGE_UPConstant forDOM_VK_PAGE_UP.static intDOM_VK_PAUSEConstant forDOM_VK_PAUSE.static intDOM_VK_PERCENTConstant forDOM_VK_PERCENT.static intDOM_VK_PERIODConstant forDOM_VK_PERIOD.static intDOM_VK_PIPEConstant forDOM_VK_PIPE.static intDOM_VK_PLAYConstant forDOM_VK_PLAY.static intDOM_VK_PLUSConstant forDOM_VK_PLUS.static intDOM_VK_PRINTConstant forDOM_VK_PRINT.static intDOM_VK_PRINTSCREENConstant forDOM_VK_PRINTSCREEN.static intDOM_VK_PROCESSKEYConstant forDOM_VK_PROCESSKEY.static intDOM_VK_QConstant forDOM_VK_Q.static intDOM_VK_QUESTION_MARKConstant forDOM_VK_QUESTION_MARK.static intDOM_VK_QUOTEConstant forDOM_VK_QUOTE.static intDOM_VK_RConstant forDOM_VK_R.static intDOM_VK_RETURNConstant forDOM_VK_RETURN.static intDOM_VK_RIGHTConstant forDOM_VK_RIGHT.static intDOM_VK_SConstant forDOM_VK_S.static intDOM_VK_SCROLL_LOCKConstant forDOM_VK_SCROLL_LOCK.static intDOM_VK_SELECTConstant forDOM_VK_SELECT.static intDOM_VK_SEMICOLONConstant forDOM_VK_SEMICOLON.static intDOM_VK_SEPARATORConstant forDOM_VK_SEPARATOR.static intDOM_VK_SHIFTConstant forDOM_VK_SHIFT.static intDOM_VK_SLASHConstant forDOM_VK_SLASH.static intDOM_VK_SLEEPConstant forDOM_VK_SLEEP.static intDOM_VK_SPACEConstant forDOM_VK_SPACE.static intDOM_VK_SUBTRACTConstant forDOM_VK_SUBTRACT.static intDOM_VK_TConstant forDOM_VK_T.static intDOM_VK_TABConstant forDOM_VK_TAB.static intDOM_VK_TILDEConstant forDOM_VK_TILDE.static intDOM_VK_UConstant forDOM_VK_U.static intDOM_VK_UNDERSCOREConstant forDOM_VK_UNDERSCORE.static intDOM_VK_UPConstant forDOM_VK_UP.static intDOM_VK_VConstant forDOM_VK_V.static intDOM_VK_VOLUME_DOWNConstant forDOM_VK_VOLUME_DOWN.static intDOM_VK_VOLUME_MUTEConstant forDOM_VK_VOLUME_MUTE.static intDOM_VK_VOLUME_UPConstant forDOM_VK_VOLUME_UP.static intDOM_VK_WConstant forDOM_VK_W.static intDOM_VK_WINConstant forDOM_VK_WIN.static intDOM_VK_WIN_ICO_00Constant forDOM_VK_WIN_ICO_00.static intDOM_VK_WIN_ICO_CLEARConstant forDOM_VK_WIN_ICO_CLEAR.static intDOM_VK_WIN_ICO_HELPConstant forDOM_VK_WIN_ICO_HELP.static intDOM_VK_WIN_OEM_ATTNConstant forDOM_VK_WIN_OEM_ATTN.static intDOM_VK_WIN_OEM_AUTOConstant forDOM_VK_WIN_OEM_AUTO.static intDOM_VK_WIN_OEM_BACKTABConstant forDOM_VK_WIN_OEM_BACKTAB.static intDOM_VK_WIN_OEM_CLEARConstant forDOM_VK_WIN_OEM_CLEAR.static intDOM_VK_WIN_OEM_COPYConstant forDOM_VK_WIN_OEM_COPY.static intDOM_VK_WIN_OEM_CUSELConstant forDOM_VK_WIN_OEM_CUSEL.static intDOM_VK_WIN_OEM_ENLWConstant forDOM_VK_WIN_OEM_ENLW.static intDOM_VK_WIN_OEM_FINISHConstant forDOM_VK_WIN_OEM_FINISH.static intDOM_VK_WIN_OEM_FJ_JISHOConstant forDOM_VK_WIN_OEM_FJ_JISHO.static intDOM_VK_WIN_OEM_FJ_LOYAConstant forDOM_VK_WIN_OEM_FJ_LOYA.static intDOM_VK_WIN_OEM_FJ_MASSHOUConstant forDOM_VK_WIN_OEM_FJ_MASSHOU.static intDOM_VK_WIN_OEM_FJ_ROYAConstant forDOM_VK_WIN_OEM_FJ_ROYA.static intDOM_VK_WIN_OEM_FJ_TOUROKUConstant forDOM_VK_WIN_OEM_FJ_TOUROKU.static intDOM_VK_WIN_OEM_JUMPConstant forDOM_VK_WIN_OEM_JUMP.static intDOM_VK_WIN_OEM_PA1Constant forDOM_VK_WIN_OEM_PA1.static intDOM_VK_WIN_OEM_PA2Constant forDOM_VK_WIN_OEM_PA2.static intDOM_VK_WIN_OEM_PA3Constant forDOM_VK_WIN_OEM_PA3.static intDOM_VK_WIN_OEM_RESETConstant forDOM_VK_WIN_OEM_RESET.static intDOM_VK_WIN_OEM_WSCTRLConstant forDOM_VK_WIN_OEM_WSCTRL.static intDOM_VK_XConstant forDOM_VK_X.static intDOM_VK_YConstant forDOM_VK_Y.static intDOM_VK_ZConstant forDOM_VK_Z.static intDOM_VK_ZOOMConstant forDOM_VK_ZOOM.private booleanisComposing_Whether the event is fired after the compositionstart and before the compositionend events.private java.lang.Stringkey_The key value of the key represented by the event.private static java.util.Map<java.lang.Character,java.lang.Integer>keyCodeMapForEvent.TYPE_KEY_DOWNandEvent.TYPE_KEY_UP, this map storesEvent.setKeyCode(int)associated with the character (if they are not the same).private intlocation_The location of the key on the keyboard or other input device.private booleanmetaKey_Whether or not the "meta" key was pressed during the firing of the event.private booleanrepeat_Whether the key is being held down such that it is automatically repeating.private intwhich_The unmodified value of the pressed key.-
Fields inherited from class org.htmlunit.javascript.host.event.UIEvent
SCROLL_PAGE_DOWN, SCROLL_PAGE_UP
-
Fields inherited from class org.htmlunit.javascript.host.event.Event
ALT_MASK, AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE, CONTROL_MASK, KEY_CURRENT_EVENT, META_MASK, NONE, SHIFT_MASK, TYPE_ABORT, TYPE_AFTERPRINT, TYPE_AFTERSCRIPTEXECUTE, TYPE_ANIMATIONCANCEL, TYPE_ANIMATIONEND, TYPE_ANIMATIONITERATION, TYPE_ANIMATIONSTART, TYPE_AUXCLICK, TYPE_BEFORE_UNLOAD, TYPE_BEFORECOPY, TYPE_BEFORECUT, TYPE_BEFOREPASTE, TYPE_BEFOREPRINT, TYPE_BEFORESCRIPTEXECUTE, TYPE_BLUR, TYPE_CANCEL, TYPE_CANPLAY, TYPE_CANPLAYTHROUGH, TYPE_CHANGE, TYPE_CLOSE, TYPE_COPY, TYPE_CUECHANGE, TYPE_CUT, TYPE_DEVICEMOTION, TYPE_DEVICEORIENTATION, TYPE_DEVICEORIENTATIONABSOLUTE, TYPE_DOM_DOCUMENT_LOADED, TYPE_DRAG, TYPE_DRAGEND, TYPE_DRAGENTER, TYPE_DRAGLEAVE, TYPE_DRAGOVER, TYPE_DRAGSTART, TYPE_DROP, TYPE_DURATIONCHANGE, TYPE_EMPTIED, TYPE_ENDED, TYPE_ERROR, TYPE_FOCUS, TYPE_FOCUS_IN, TYPE_FOCUS_OUT, TYPE_GAMEPAD_CONNECTED, TYPE_GAMEPAD_DISCONNECTED, TYPE_GOTPOINTERCAPTURE, TYPE_HASH_CHANGE, TYPE_INPUT, TYPE_INVALID, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LANGUAGECHANGE, TYPE_LOAD, TYPE_LOAD_END, TYPE_LOAD_START, TYPE_LOADEDDATA, TYPE_LOADEDMETADATA, TYPE_LOSTPOINTERCAPTURE, TYPE_MESSAGE, TYPE_MOUDEENTER, TYPE_MOUSELEAVE, TYPE_MOUSEWHEEL, TYPE_MOZFULLSCREENCHANGE, TYPE_MOZFULLSCREENERROR, TYPE_MSSITEMODEJUMPLISTITEMREMOVED, TYPE_OFFLINE, TYPE_ONLINE, TYPE_ONMESSAGEERROR, TYPE_ONTRANSITIONCANCEL, TYPE_ONTRANSITIONEND, TYPE_ONTRANSITIONRUN, TYPE_ONTRANSITIONSTART, TYPE_OPEN, TYPE_PAGEHIDE, TYPE_PAGESHOW, TYPE_PASTE, TYPE_PAUSE, TYPE_PLAY, TYPE_PLAYING, TYPE_POINTERCANCEL, TYPE_POINTERDOWN, TYPE_POINTERENTER, TYPE_POINTERLEAVE, TYPE_POINTERLOCKCHANGE, TYPE_POINTERLOCKERROR, TYPE_POINTERMOVE, TYPE_POINTEROUT, TYPE_POINTEROVER, TYPE_POINTERUP, TYPE_POPSTATE, TYPE_PROGRESS, TYPE_PROPERTY_CHANGE, TYPE_RATECHANGE, TYPE_READY_STATE_CHANGE, TYPE_REJECTIONHANDLED, TYPE_RESET, TYPE_RESIZE, TYPE_SCROLL, TYPE_SCROLLEND, TYPE_SEARCH, TYPE_SEEKED, TYPE_SEEKING, TYPE_SELECT, TYPE_SELECTIONCHANGE, TYPE_SELECTSTART, TYPE_STALLED, TYPE_STORAGE, TYPE_SUBMIT, TYPE_SUSPEND, TYPE_TIMEOUT, TYPE_TIMEUPDATE, TYPE_TOGGLE, TYPE_TRANSITIONEND, TYPE_UNHANDLEDREJECTION, TYPE_UNLOAD, TYPE_VOLUMECHANGE, TYPE_WAITING, TYPE_WEBANIMATIONSTART, TYPE_WEBKITANIMATIONEND, TYPE_WEBKITANIMATIONITERATION, TYPE_WEBKITFULLSCREENCHANGE, TYPE_WEBKITFULLSCREENERROR, TYPE_WEBKITTRANSITIONEND, TYPE_WHEEL
-
-
Constructor Summary
Constructors Constructor Description KeyboardEvent()Creates a new keyboard event instance.KeyboardEvent(DomNode domNode, java.lang.String type, char character, boolean shiftKey, boolean ctrlKey, boolean altKey)Creates a new keyboard event instance.KeyboardEvent(DomNode domNode, java.lang.String type, int keyCode, boolean shiftKey, boolean ctrlKey, boolean altKey)Creates a new keyboard event instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static intcharToKeyCode(char c)Converts a Java character to a keyCode.private java.lang.StringdetermineCode()Determines the value of the 'code' property from the current value of 'keyCode', 'charCode', or 'which'.private java.lang.StringdetermineKey()Determines the value of the 'key' property from the current value of 'keyCode', 'charCode', or 'which'.intgetCharCode()Returns the char code associated with the event.java.lang.StringgetCode()Returns a physical key on the keyboard.booleangetIsComposing()Returns whether or not the event is fired after the compositionstart and before the compositionend events.java.lang.StringgetKey()Returns the value of a key or keys pressed by the user.intgetKeyCode()Returns the key code associated with the event.intgetLocation()Returns the location of the key on the keyboard.booleangetMetaKey()Returns whether or not the "meta" key was pressed during the event firing.intgetWhich()Returns the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.voidinitKeyboardEvent(java.lang.String type, boolean bubbles, boolean cancelable, java.lang.Object view, java.lang.String key, int location, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey)Implementation of the DOM Level 3 Event method for initializing the key event.booleanisAltKey()Returns whetherALThas been pressed during this event or not.private static booleanisAmbiguousKeyCode(int keyCode)We can not accept DOM_VK_A, because is it 'A' or 'a', so the character constructor should be used.booleanisCtrlKey()Returns whetherCTRLhas been pressed during this event or not.booleanisRepeat()Returns whether or not the key is being held down such that it is automatically repeating.booleanisShiftKey()Returns whetherSHIFThas been pressed during this event or not.static booleanisShiftNeeded(char ch, boolean shiftKey)Returns whether the specified character can be written only whenSHIFTkey is pressed.voidjsConstructor(java.lang.String type, org.htmlunit.corejs.javascript.ScriptableObject details)JavaScript constructor.protected voidsetCharCode(int charCode)Sets the char code associated with the event.protected voidsetCode(java.lang.String code)Sets a physical key on the keyboard.protected voidsetIsComposing(boolean isComposing)Sets whether or not this event is fired after the compositionstart and before the compositionend events.protected voidsetKey(java.lang.String key)Sets the value of a key or keys pressed by the user.protected voidsetLocation(int location)Sets the location of the key on the keyboard.protected voidsetMetaKey(boolean metaKey)Sets whether or not the "meta" key was pressed during the event firing.protected voidsetRepeat(boolean repeat)Sets whether or not the key is being held down such that it is automatically repeating.protected voidsetWhich(int which)Sets the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.-
Methods inherited from class org.htmlunit.javascript.host.event.UIEvent
getDetail, getView, initUIEvent, setDetail
-
Methods inherited from class org.htmlunit.javascript.host.event.Event
createPropertyChangeEvent, endFire, eventCreated, getComposed, getCurrentTarget, getEventPhase, getPropertyName, getReturnValue, getSrcElement, getTarget, getTimeStamp, getType, handlePropertyHandlerReturnValue, initEvent, isAborted, isBubbles, isCancelable, isCancelBubble, isDefaultPrevented, isImmediatePropagationStopped, isMissingOrUndefined, isPropagationStopped, preventDefault, processLabelAfterBubbling, setAltKey, setBubbles, setCancelable, setCancelBubble, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setKeyCode, setReturnValue, setShiftKey, setSrcElement, setTarget, setType, startFire, stopImmediatePropagation, stopPropagation, toString
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
DOM_KEY_LOCATION_STANDARD
public static final int DOM_KEY_LOCATION_STANDARD
Constant forDOM_KEY_LOCATION_STANDARD.- See Also:
- Constant Field Values
-
DOM_KEY_LOCATION_LEFT
public static final int DOM_KEY_LOCATION_LEFT
Constant forDOM_KEY_LOCATION_LEFT.- See Also:
- Constant Field Values
-
DOM_KEY_LOCATION_RIGHT
public static final int DOM_KEY_LOCATION_RIGHT
Constant forDOM_KEY_LOCATION_RIGHT.- See Also:
- Constant Field Values
-
DOM_KEY_LOCATION_NUMPAD
public static final int DOM_KEY_LOCATION_NUMPAD
Constant forDOM_KEY_LOCATION_NUMPAD.- See Also:
- Constant Field Values
-
DOM_VK_CANCEL
public static final int DOM_VK_CANCEL
Constant forDOM_VK_CANCEL.- See Also:
- Constant Field Values
-
DOM_VK_HELP
public static final int DOM_VK_HELP
Constant forDOM_VK_HELP.- See Also:
- Constant Field Values
-
DOM_VK_TAB
public static final int DOM_VK_TAB
Constant forDOM_VK_TAB.- See Also:
- Constant Field Values
-
DOM_VK_CLEAR
public static final int DOM_VK_CLEAR
Constant forDOM_VK_CLEAR.- See Also:
- Constant Field Values
-
DOM_VK_RETURN
public static final int DOM_VK_RETURN
Constant forDOM_VK_RETURN.- See Also:
- Constant Field Values
-
DOM_VK_SHIFT
public static final int DOM_VK_SHIFT
Constant forDOM_VK_SHIFT.- See Also:
- Constant Field Values
-
DOM_VK_CONTROL
public static final int DOM_VK_CONTROL
Constant forDOM_VK_CONTROL.- See Also:
- Constant Field Values
-
DOM_VK_ALT
public static final int DOM_VK_ALT
Constant forDOM_VK_ALT.- See Also:
- Constant Field Values
-
DOM_VK_PAUSE
public static final int DOM_VK_PAUSE
Constant forDOM_VK_PAUSE.- See Also:
- Constant Field Values
-
DOM_VK_CAPS_LOCK
public static final int DOM_VK_CAPS_LOCK
Constant forDOM_VK_CAPS_LOCK.- See Also:
- Constant Field Values
-
DOM_VK_HANGUL
public static final int DOM_VK_HANGUL
Constant forDOM_VK_HANGUL.- See Also:
- Constant Field Values
-
DOM_VK_KANA
public static final int DOM_VK_KANA
Constant forDOM_VK_KANA.- See Also:
- Constant Field Values
-
DOM_VK_EISU
public static final int DOM_VK_EISU
Constant forDOM_VK_EISU.- See Also:
- Constant Field Values
-
DOM_VK_FINAL
public static final int DOM_VK_FINAL
Constant forDOM_VK_FINAL.- See Also:
- Constant Field Values
-
DOM_VK_JUNJA
public static final int DOM_VK_JUNJA
Constant forDOM_VK_JUNJA.- See Also:
- Constant Field Values
-
DOM_VK_HANJA
public static final int DOM_VK_HANJA
Constant forDOM_VK_HANJA.- See Also:
- Constant Field Values
-
DOM_VK_KANJI
public static final int DOM_VK_KANJI
Constant forDOM_VK_KANJI.- See Also:
- Constant Field Values
-
DOM_VK_ESCAPE
public static final int DOM_VK_ESCAPE
Constant forDOM_VK_ESCAPE.- See Also:
- Constant Field Values
-
DOM_VK_CONVERT
public static final int DOM_VK_CONVERT
Constant forDOM_VK_CONVERT.- See Also:
- Constant Field Values
-
DOM_VK_NONCONVERT
public static final int DOM_VK_NONCONVERT
Constant forDOM_VK_NONCONVERT.- See Also:
- Constant Field Values
-
DOM_VK_ACCEPT
public static final int DOM_VK_ACCEPT
Constant forDOM_VK_ACCEPT.- See Also:
- Constant Field Values
-
DOM_VK_MODECHANGE
public static final int DOM_VK_MODECHANGE
Constant forDOM_VK_MODECHANGE.- See Also:
- Constant Field Values
-
DOM_VK_SPACE
public static final int DOM_VK_SPACE
Constant forDOM_VK_SPACE.- See Also:
- Constant Field Values
-
DOM_VK_PAGE_UP
public static final int DOM_VK_PAGE_UP
Constant forDOM_VK_PAGE_UP.- See Also:
- Constant Field Values
-
DOM_VK_PAGE_DOWN
public static final int DOM_VK_PAGE_DOWN
Constant forDOM_VK_PAGE_DOWN.- See Also:
- Constant Field Values
-
DOM_VK_END
public static final int DOM_VK_END
Constant forDOM_VK_END.- See Also:
- Constant Field Values
-
DOM_VK_HOME
public static final int DOM_VK_HOME
Constant forDOM_VK_HOME.- See Also:
- Constant Field Values
-
DOM_VK_LEFT
public static final int DOM_VK_LEFT
Constant forDOM_VK_LEFT.- See Also:
- Constant Field Values
-
DOM_VK_UP
public static final int DOM_VK_UP
Constant forDOM_VK_UP.- See Also:
- Constant Field Values
-
DOM_VK_RIGHT
public static final int DOM_VK_RIGHT
Constant forDOM_VK_RIGHT.- See Also:
- Constant Field Values
-
DOM_VK_SELECT
public static final int DOM_VK_SELECT
Constant forDOM_VK_SELECT.- See Also:
- Constant Field Values
-
DOM_VK_DOWN
public static final int DOM_VK_DOWN
Constant forDOM_VK_DOWN.- See Also:
- Constant Field Values
-
DOM_VK_PRINT
public static final int DOM_VK_PRINT
Constant forDOM_VK_PRINT.- See Also:
- Constant Field Values
-
DOM_VK_EXECUTE
public static final int DOM_VK_EXECUTE
Constant forDOM_VK_EXECUTE.- See Also:
- Constant Field Values
-
DOM_VK_PRINTSCREEN
public static final int DOM_VK_PRINTSCREEN
Constant forDOM_VK_PRINTSCREEN.- See Also:
- Constant Field Values
-
DOM_VK_INSERT
public static final int DOM_VK_INSERT
Constant forDOM_VK_INSERT.- See Also:
- Constant Field Values
-
DOM_VK_DELETE
public static final int DOM_VK_DELETE
Constant forDOM_VK_DELETE.- See Also:
- Constant Field Values
-
DOM_VK_0
public static final int DOM_VK_0
Constant forDOM_VK_0.- See Also:
- Constant Field Values
-
DOM_VK_1
public static final int DOM_VK_1
Constant forDOM_VK_1.- See Also:
- Constant Field Values
-
DOM_VK_2
public static final int DOM_VK_2
Constant forDOM_VK_2.- See Also:
- Constant Field Values
-
DOM_VK_3
public static final int DOM_VK_3
Constant forDOM_VK_3.- See Also:
- Constant Field Values
-
DOM_VK_4
public static final int DOM_VK_4
Constant forDOM_VK_4.- See Also:
- Constant Field Values
-
DOM_VK_5
public static final int DOM_VK_5
Constant forDOM_VK_5.- See Also:
- Constant Field Values
-
DOM_VK_6
public static final int DOM_VK_6
Constant forDOM_VK_6.- See Also:
- Constant Field Values
-
DOM_VK_7
public static final int DOM_VK_7
Constant forDOM_VK_7.- See Also:
- Constant Field Values
-
DOM_VK_8
public static final int DOM_VK_8
Constant forDOM_VK_8.- See Also:
- Constant Field Values
-
DOM_VK_9
public static final int DOM_VK_9
Constant forDOM_VK_9.- See Also:
- Constant Field Values
-
DOM_VK_COLON
public static final int DOM_VK_COLON
Constant forDOM_VK_COLON.- See Also:
- Constant Field Values
-
DOM_VK_SEMICOLON
public static final int DOM_VK_SEMICOLON
Constant forDOM_VK_SEMICOLON.- See Also:
- Constant Field Values
-
DOM_VK_LESS_THAN
public static final int DOM_VK_LESS_THAN
Constant forDOM_VK_LESS_THAN.- See Also:
- Constant Field Values
-
DOM_VK_EQUALS
public static final int DOM_VK_EQUALS
Constant forDOM_VK_EQUALS.- See Also:
- Constant Field Values
-
DOM_VK_GREATER_THAN
public static final int DOM_VK_GREATER_THAN
Constant forDOM_VK_GREATER_THAN.- See Also:
- Constant Field Values
-
DOM_VK_QUESTION_MARK
public static final int DOM_VK_QUESTION_MARK
Constant forDOM_VK_QUESTION_MARK.- See Also:
- Constant Field Values
-
DOM_VK_AT
public static final int DOM_VK_AT
Constant forDOM_VK_AT.- See Also:
- Constant Field Values
-
DOM_VK_A
public static final int DOM_VK_A
Constant forDOM_VK_A.- See Also:
- Constant Field Values
-
DOM_VK_B
public static final int DOM_VK_B
Constant forDOM_VK_B.- See Also:
- Constant Field Values
-
DOM_VK_C
public static final int DOM_VK_C
Constant forDOM_VK_C.- See Also:
- Constant Field Values
-
DOM_VK_D
public static final int DOM_VK_D
Constant forDOM_VK_D.- See Also:
- Constant Field Values
-
DOM_VK_E
public static final int DOM_VK_E
Constant forDOM_VK_E.- See Also:
- Constant Field Values
-
DOM_VK_F
public static final int DOM_VK_F
Constant forDOM_VK_F.- See Also:
- Constant Field Values
-
DOM_VK_G
public static final int DOM_VK_G
Constant forDOM_VK_G.- See Also:
- Constant Field Values
-
DOM_VK_H
public static final int DOM_VK_H
Constant forDOM_VK_H.- See Also:
- Constant Field Values
-
DOM_VK_I
public static final int DOM_VK_I
Constant forDOM_VK_I.- See Also:
- Constant Field Values
-
DOM_VK_J
public static final int DOM_VK_J
Constant forDOM_VK_J.- See Also:
- Constant Field Values
-
DOM_VK_K
public static final int DOM_VK_K
Constant forDOM_VK_K.- See Also:
- Constant Field Values
-
DOM_VK_L
public static final int DOM_VK_L
Constant forDOM_VK_L.- See Also:
- Constant Field Values
-
DOM_VK_M
public static final int DOM_VK_M
Constant forDOM_VK_M.- See Also:
- Constant Field Values
-
DOM_VK_N
public static final int DOM_VK_N
Constant forDOM_VK_N.- See Also:
- Constant Field Values
-
DOM_VK_O
public static final int DOM_VK_O
Constant forDOM_VK_O.- See Also:
- Constant Field Values
-
DOM_VK_BACK_SPACE
public static final int DOM_VK_BACK_SPACE
Constant forDOM_VK_BACK_SPACE.- See Also:
- Constant Field Values
-
DOM_VK_P
public static final int DOM_VK_P
Constant forDOM_VK_P.- See Also:
- Constant Field Values
-
DOM_VK_Q
public static final int DOM_VK_Q
Constant forDOM_VK_Q.- See Also:
- Constant Field Values
-
DOM_VK_R
public static final int DOM_VK_R
Constant forDOM_VK_R.- See Also:
- Constant Field Values
-
DOM_VK_S
public static final int DOM_VK_S
Constant forDOM_VK_S.- See Also:
- Constant Field Values
-
DOM_VK_T
public static final int DOM_VK_T
Constant forDOM_VK_T.- See Also:
- Constant Field Values
-
DOM_VK_U
public static final int DOM_VK_U
Constant forDOM_VK_U.- See Also:
- Constant Field Values
-
DOM_VK_V
public static final int DOM_VK_V
Constant forDOM_VK_V.- See Also:
- Constant Field Values
-
DOM_VK_W
public static final int DOM_VK_W
Constant forDOM_VK_W.- See Also:
- Constant Field Values
-
DOM_VK_X
public static final int DOM_VK_X
Constant forDOM_VK_X.- See Also:
- Constant Field Values
-
DOM_VK_Y
public static final int DOM_VK_Y
Constant forDOM_VK_Y.- See Also:
- Constant Field Values
-
DOM_VK_Z
public static final int DOM_VK_Z
Constant forDOM_VK_Z.- See Also:
- Constant Field Values
-
DOM_VK_WIN
public static final int DOM_VK_WIN
Constant forDOM_VK_WIN.- See Also:
- Constant Field Values
-
DOM_VK_CONTEXT_MENU
public static final int DOM_VK_CONTEXT_MENU
Constant forDOM_VK_CONTEXT_MENU.- See Also:
- Constant Field Values
-
DOM_VK_SLEEP
public static final int DOM_VK_SLEEP
Constant forDOM_VK_SLEEP.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD0
public static final int DOM_VK_NUMPAD0
Constant forDOM_VK_NUMPAD0.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD1
public static final int DOM_VK_NUMPAD1
Constant forDOM_VK_NUMPAD1.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD2
public static final int DOM_VK_NUMPAD2
Constant forDOM_VK_NUMPAD2.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD3
public static final int DOM_VK_NUMPAD3
Constant forDOM_VK_NUMPAD3.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD4
public static final int DOM_VK_NUMPAD4
Constant forDOM_VK_NUMPAD4.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD5
public static final int DOM_VK_NUMPAD5
Constant forDOM_VK_NUMPAD5.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD6
public static final int DOM_VK_NUMPAD6
Constant forDOM_VK_NUMPAD6.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD7
public static final int DOM_VK_NUMPAD7
Constant forDOM_VK_NUMPAD7.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD8
public static final int DOM_VK_NUMPAD8
Constant forDOM_VK_NUMPAD8.- See Also:
- Constant Field Values
-
DOM_VK_NUMPAD9
public static final int DOM_VK_NUMPAD9
Constant forDOM_VK_NUMPAD9.- See Also:
- Constant Field Values
-
DOM_VK_MULTIPLY
public static final int DOM_VK_MULTIPLY
Constant forDOM_VK_MULTIPLY.- See Also:
- Constant Field Values
-
DOM_VK_ADD
public static final int DOM_VK_ADD
Constant forDOM_VK_ADD.- See Also:
- Constant Field Values
-
DOM_VK_SEPARATOR
public static final int DOM_VK_SEPARATOR
Constant forDOM_VK_SEPARATOR.- See Also:
- Constant Field Values
-
DOM_VK_SUBTRACT
public static final int DOM_VK_SUBTRACT
Constant forDOM_VK_SUBTRACT.- See Also:
- Constant Field Values
-
DOM_VK_DECIMAL
public static final int DOM_VK_DECIMAL
Constant forDOM_VK_DECIMAL.- See Also:
- Constant Field Values
-
DOM_VK_DIVIDE
public static final int DOM_VK_DIVIDE
Constant forDOM_VK_DIVIDE.- See Also:
- Constant Field Values
-
DOM_VK_F1
public static final int DOM_VK_F1
Constant forDOM_VK_F1.- See Also:
- Constant Field Values
-
DOM_VK_F2
public static final int DOM_VK_F2
Constant forDOM_VK_F2.- See Also:
- Constant Field Values
-
DOM_VK_F3
public static final int DOM_VK_F3
Constant forDOM_VK_F3.- See Also:
- Constant Field Values
-
DOM_VK_F4
public static final int DOM_VK_F4
Constant forDOM_VK_F4.- See Also:
- Constant Field Values
-
DOM_VK_F5
public static final int DOM_VK_F5
Constant forDOM_VK_F5.- See Also:
- Constant Field Values
-
DOM_VK_F6
public static final int DOM_VK_F6
Constant forDOM_VK_F6.- See Also:
- Constant Field Values
-
DOM_VK_F7
public static final int DOM_VK_F7
Constant forDOM_VK_F7.- See Also:
- Constant Field Values
-
DOM_VK_F8
public static final int DOM_VK_F8
Constant forDOM_VK_F8.- See Also:
- Constant Field Values
-
DOM_VK_F9
public static final int DOM_VK_F9
Constant forDOM_VK_F9.- See Also:
- Constant Field Values
-
DOM_VK_F10
public static final int DOM_VK_F10
Constant forDOM_VK_F10.- See Also:
- Constant Field Values
-
DOM_VK_F11
public static final int DOM_VK_F11
Constant forDOM_VK_F11.- See Also:
- Constant Field Values
-
DOM_VK_F12
public static final int DOM_VK_F12
Constant forDOM_VK_F12.- See Also:
- Constant Field Values
-
DOM_VK_F13
public static final int DOM_VK_F13
Constant forDOM_VK_F13.- See Also:
- Constant Field Values
-
DOM_VK_F14
public static final int DOM_VK_F14
Constant forDOM_VK_F14.- See Also:
- Constant Field Values
-
DOM_VK_F15
public static final int DOM_VK_F15
Constant forDOM_VK_F15.- See Also:
- Constant Field Values
-
DOM_VK_F16
public static final int DOM_VK_F16
Constant forDOM_VK_F16.- See Also:
- Constant Field Values
-
DOM_VK_F17
public static final int DOM_VK_F17
Constant forDOM_VK_F17.- See Also:
- Constant Field Values
-
DOM_VK_F18
public static final int DOM_VK_F18
Constant forDOM_VK_F18.- See Also:
- Constant Field Values
-
DOM_VK_F19
public static final int DOM_VK_F19
Constant forDOM_VK_F19.- See Also:
- Constant Field Values
-
DOM_VK_F20
public static final int DOM_VK_F20
Constant forDOM_VK_F20.- See Also:
- Constant Field Values
-
DOM_VK_F21
public static final int DOM_VK_F21
Constant forDOM_VK_F21.- See Also:
- Constant Field Values
-
DOM_VK_F22
public static final int DOM_VK_F22
Constant forDOM_VK_F22.- See Also:
- Constant Field Values
-
DOM_VK_F23
public static final int DOM_VK_F23
Constant forDOM_VK_F23.- See Also:
- Constant Field Values
-
DOM_VK_F24
public static final int DOM_VK_F24
Constant forDOM_VK_F24.- See Also:
- Constant Field Values
-
DOM_VK_NUM_LOCK
public static final int DOM_VK_NUM_LOCK
Constant forDOM_VK_NUM_LOCK.- See Also:
- Constant Field Values
-
DOM_VK_SCROLL_LOCK
public static final int DOM_VK_SCROLL_LOCK
Constant forDOM_VK_SCROLL_LOCK.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FJ_JISHO
public static final int DOM_VK_WIN_OEM_FJ_JISHO
Constant forDOM_VK_WIN_OEM_FJ_JISHO.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FJ_MASSHOU
public static final int DOM_VK_WIN_OEM_FJ_MASSHOU
Constant forDOM_VK_WIN_OEM_FJ_MASSHOU.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FJ_TOUROKU
public static final int DOM_VK_WIN_OEM_FJ_TOUROKU
Constant forDOM_VK_WIN_OEM_FJ_TOUROKU.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FJ_LOYA
public static final int DOM_VK_WIN_OEM_FJ_LOYA
Constant forDOM_VK_WIN_OEM_FJ_LOYA.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FJ_ROYA
public static final int DOM_VK_WIN_OEM_FJ_ROYA
Constant forDOM_VK_WIN_OEM_FJ_ROYA.- See Also:
- Constant Field Values
-
DOM_VK_CIRCUMFLEX
public static final int DOM_VK_CIRCUMFLEX
Constant forDOM_VK_CIRCUMFLEX.- See Also:
- Constant Field Values
-
DOM_VK_EXCLAMATION
public static final int DOM_VK_EXCLAMATION
Constant forDOM_VK_EXCLAMATION.- See Also:
- Constant Field Values
-
DOM_VK_DOUBLE_QUOTE
public static final int DOM_VK_DOUBLE_QUOTE
Constant forDOM_VK_DOUBLE_QUOTE.- See Also:
- Constant Field Values
-
DOM_VK_HASH
public static final int DOM_VK_HASH
Constant forDOM_VK_HASH.- See Also:
- Constant Field Values
-
DOM_VK_DOLLAR
public static final int DOM_VK_DOLLAR
Constant forDOM_VK_DOLLAR.- See Also:
- Constant Field Values
-
DOM_VK_PERCENT
public static final int DOM_VK_PERCENT
Constant forDOM_VK_PERCENT.- See Also:
- Constant Field Values
-
DOM_VK_AMPERSAND
public static final int DOM_VK_AMPERSAND
Constant forDOM_VK_AMPERSAND.- See Also:
- Constant Field Values
-
DOM_VK_UNDERSCORE
public static final int DOM_VK_UNDERSCORE
Constant forDOM_VK_UNDERSCORE.- See Also:
- Constant Field Values
-
DOM_VK_OPEN_PAREN
public static final int DOM_VK_OPEN_PAREN
Constant forDOM_VK_OPEN_PAREN.- See Also:
- Constant Field Values
-
DOM_VK_CLOSE_PAREN
public static final int DOM_VK_CLOSE_PAREN
Constant forDOM_VK_CLOSE_PAREN.- See Also:
- Constant Field Values
-
DOM_VK_ASTERISK
public static final int DOM_VK_ASTERISK
Constant forDOM_VK_ASTERISK.- See Also:
- Constant Field Values
-
DOM_VK_PLUS
public static final int DOM_VK_PLUS
Constant forDOM_VK_PLUS.- See Also:
- Constant Field Values
-
DOM_VK_PIPE
public static final int DOM_VK_PIPE
Constant forDOM_VK_PIPE.- See Also:
- Constant Field Values
-
DOM_VK_HYPHEN_MINUS
public static final int DOM_VK_HYPHEN_MINUS
Constant forDOM_VK_HYPHEN_MINUS.- See Also:
- Constant Field Values
-
DOM_VK_OPEN_CURLY_BRACKET
public static final int DOM_VK_OPEN_CURLY_BRACKET
Constant forDOM_VK_OPEN_CURLY_BRACKET.- See Also:
- Constant Field Values
-
DOM_VK_CLOSE_CURLY_BRACKET
public static final int DOM_VK_CLOSE_CURLY_BRACKET
Constant forDOM_VK_CLOSE_CURLY_BRACKET.- See Also:
- Constant Field Values
-
DOM_VK_TILDE
public static final int DOM_VK_TILDE
Constant forDOM_VK_TILDE.- See Also:
- Constant Field Values
-
DOM_VK_VOLUME_MUTE
public static final int DOM_VK_VOLUME_MUTE
Constant forDOM_VK_VOLUME_MUTE.- See Also:
- Constant Field Values
-
DOM_VK_VOLUME_DOWN
public static final int DOM_VK_VOLUME_DOWN
Constant forDOM_VK_VOLUME_DOWN.- See Also:
- Constant Field Values
-
DOM_VK_VOLUME_UP
public static final int DOM_VK_VOLUME_UP
Constant forDOM_VK_VOLUME_UP.- See Also:
- Constant Field Values
-
DOM_VK_COMMA
public static final int DOM_VK_COMMA
Constant forDOM_VK_COMMA.- See Also:
- Constant Field Values
-
DOM_VK_PERIOD
public static final int DOM_VK_PERIOD
Constant forDOM_VK_PERIOD.- See Also:
- Constant Field Values
-
DOM_VK_SLASH
public static final int DOM_VK_SLASH
Constant forDOM_VK_SLASH.- See Also:
- Constant Field Values
-
DOM_VK_BACK_QUOTE
public static final int DOM_VK_BACK_QUOTE
Constant forDOM_VK_BACK_QUOTE.- See Also:
- Constant Field Values
-
DOM_VK_OPEN_BRACKET
public static final int DOM_VK_OPEN_BRACKET
Constant forDOM_VK_OPEN_BRACKET.- See Also:
- Constant Field Values
-
DOM_VK_BACK_SLASH
public static final int DOM_VK_BACK_SLASH
Constant forDOM_VK_BACK_SLASH.- See Also:
- Constant Field Values
-
DOM_VK_CLOSE_BRACKET
public static final int DOM_VK_CLOSE_BRACKET
Constant forDOM_VK_CLOSE_BRACKET.- See Also:
- Constant Field Values
-
DOM_VK_QUOTE
public static final int DOM_VK_QUOTE
Constant forDOM_VK_QUOTE.- See Also:
- Constant Field Values
-
DOM_VK_META
public static final int DOM_VK_META
Constant forDOM_VK_META.- See Also:
- Constant Field Values
-
DOM_VK_ALTGR
public static final int DOM_VK_ALTGR
Constant forDOM_VK_ALTGR.- See Also:
- Constant Field Values
-
DOM_VK_WIN_ICO_HELP
public static final int DOM_VK_WIN_ICO_HELP
Constant forDOM_VK_WIN_ICO_HELP.- See Also:
- Constant Field Values
-
DOM_VK_WIN_ICO_00
public static final int DOM_VK_WIN_ICO_00
Constant forDOM_VK_WIN_ICO_00.- See Also:
- Constant Field Values
-
DOM_VK_PROCESSKEY
public static final int DOM_VK_PROCESSKEY
Constant forDOM_VK_PROCESSKEY.- See Also:
- Constant Field Values
-
DOM_VK_WIN_ICO_CLEAR
public static final int DOM_VK_WIN_ICO_CLEAR
Constant forDOM_VK_WIN_ICO_CLEAR.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_RESET
public static final int DOM_VK_WIN_OEM_RESET
Constant forDOM_VK_WIN_OEM_RESET.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_JUMP
public static final int DOM_VK_WIN_OEM_JUMP
Constant forDOM_VK_WIN_OEM_JUMP.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_PA1
public static final int DOM_VK_WIN_OEM_PA1
Constant forDOM_VK_WIN_OEM_PA1.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_PA2
public static final int DOM_VK_WIN_OEM_PA2
Constant forDOM_VK_WIN_OEM_PA2.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_PA3
public static final int DOM_VK_WIN_OEM_PA3
Constant forDOM_VK_WIN_OEM_PA3.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_WSCTRL
public static final int DOM_VK_WIN_OEM_WSCTRL
Constant forDOM_VK_WIN_OEM_WSCTRL.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_CUSEL
public static final int DOM_VK_WIN_OEM_CUSEL
Constant forDOM_VK_WIN_OEM_CUSEL.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_ATTN
public static final int DOM_VK_WIN_OEM_ATTN
Constant forDOM_VK_WIN_OEM_ATTN.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_FINISH
public static final int DOM_VK_WIN_OEM_FINISH
Constant forDOM_VK_WIN_OEM_FINISH.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_COPY
public static final int DOM_VK_WIN_OEM_COPY
Constant forDOM_VK_WIN_OEM_COPY.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_AUTO
public static final int DOM_VK_WIN_OEM_AUTO
Constant forDOM_VK_WIN_OEM_AUTO.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_ENLW
public static final int DOM_VK_WIN_OEM_ENLW
Constant forDOM_VK_WIN_OEM_ENLW.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_BACKTAB
public static final int DOM_VK_WIN_OEM_BACKTAB
Constant forDOM_VK_WIN_OEM_BACKTAB.- See Also:
- Constant Field Values
-
DOM_VK_ATTN
public static final int DOM_VK_ATTN
Constant forDOM_VK_ATTN.- See Also:
- Constant Field Values
-
DOM_VK_CRSEL
public static final int DOM_VK_CRSEL
Constant forDOM_VK_CRSEL.- See Also:
- Constant Field Values
-
DOM_VK_EXSEL
public static final int DOM_VK_EXSEL
Constant forDOM_VK_EXSEL.- See Also:
- Constant Field Values
-
DOM_VK_EREOF
public static final int DOM_VK_EREOF
Constant forDOM_VK_EREOF.- See Also:
- Constant Field Values
-
DOM_VK_PLAY
public static final int DOM_VK_PLAY
Constant forDOM_VK_PLAY.- See Also:
- Constant Field Values
-
DOM_VK_ZOOM
public static final int DOM_VK_ZOOM
Constant forDOM_VK_ZOOM.- See Also:
- Constant Field Values
-
DOM_VK_PA1
public static final int DOM_VK_PA1
Constant forDOM_VK_PA1.- See Also:
- Constant Field Values
-
DOM_VK_WIN_OEM_CLEAR
public static final int DOM_VK_WIN_OEM_CLEAR
Constant forDOM_VK_WIN_OEM_CLEAR.- See Also:
- Constant Field Values
-
keyCodeMap
private static final java.util.Map<java.lang.Character,java.lang.Integer> keyCodeMap
ForEvent.TYPE_KEY_DOWNandEvent.TYPE_KEY_UP, this map storesEvent.setKeyCode(int)associated with the character (if they are not the same). You can verify this here
-
key_
private java.lang.String key_
The key value of the key represented by the event.
-
code_
private java.lang.String code_
The code value of the physical key represented by the event.
-
location_
private int location_
The location of the key on the keyboard or other input device. See DOM_KEY_LOCATION_* constants.
-
metaKey_
private boolean metaKey_
Whether or not the "meta" key was pressed during the firing of the event.
-
repeat_
private boolean repeat_
Whether the key is being held down such that it is automatically repeating.
-
isComposing_
private boolean isComposing_
Whether the event is fired after the compositionstart and before the compositionend events.
-
charCode_
private int charCode_
The Unicode reference number of the key.
-
which_
private int which_
The unmodified value of the pressed key. This is usually the same as keyCode.
-
-
Constructor Detail
-
KeyboardEvent
public KeyboardEvent()
Creates a new keyboard event instance.
-
KeyboardEvent
public KeyboardEvent(DomNode domNode, java.lang.String type, char character, boolean shiftKey, boolean ctrlKey, boolean altKey)
Creates a new keyboard event instance.- Parameters:
domNode- the DOM node that triggered the eventtype- the event typecharacter- the character associated with the eventshiftKey- true if SHIFT is pressedctrlKey- true if CTRL is pressedaltKey- true if ALT is pressed
-
KeyboardEvent
public KeyboardEvent(DomNode domNode, java.lang.String type, int keyCode, boolean shiftKey, boolean ctrlKey, boolean altKey)
Creates a new keyboard event instance.- Parameters:
domNode- the DOM node that triggered the eventtype- the event typekeyCode- the key code associated with the eventshiftKey- true if SHIFT is pressedctrlKey- true if CTRL is pressedaltKey- true if ALT is pressed
-
-
Method Detail
-
isShiftNeeded
public static boolean isShiftNeeded(char ch, boolean shiftKey)Returns whether the specified character can be written only whenSHIFTkey is pressed.- Parameters:
ch- the charactershiftKey- is shift key pressed- Returns:
- whether the specified character can be written only when
SHIFTkey is pressed
-
isAmbiguousKeyCode
private static boolean isAmbiguousKeyCode(int keyCode)
We can not accept DOM_VK_A, because is it 'A' or 'a', so the character constructor should be used.
-
charToKeyCode
private static int charToKeyCode(char c)
Converts a Java character to a keyCode.- Parameters:
c- the character- Returns:
- the corresponding keycode
- See Also:
- DOM 3 Events
-
determineKey
private java.lang.String determineKey()
Determines the value of the 'key' property from the current value of 'keyCode', 'charCode', or 'which'.- Returns:
- the key value
-
determineCode
private java.lang.String determineCode()
Determines the value of the 'code' property from the current value of 'keyCode', 'charCode', or 'which'.- Returns:
- the code value
-
jsConstructor
public void jsConstructor(java.lang.String type, org.htmlunit.corejs.javascript.ScriptableObject details)JavaScript constructor.- Overrides:
jsConstructorin classUIEvent- Parameters:
type- the event typedetails- the event details (optional)
-
initKeyboardEvent
public void initKeyboardEvent(java.lang.String type, boolean bubbles, boolean cancelable, java.lang.Object view, java.lang.String key, int location, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey)Implementation of the DOM Level 3 Event method for initializing the key event.- Parameters:
type- the event typebubbles- can the event bubblecancelable- can the event be canceledview- the view to use for this eventkey- the value of the key attribute. Defaults to ""location- the value of the location attribute. Defaults to 0ctrlKey- is the control key pressedaltKey- is the alt key pressedshiftKey- is the shift key pressedmetaKey- is the meta key pressed
-
getCharCode
public int getCharCode()
Returns the char code associated with the event.- Returns:
- the char code associated with the event
-
setCharCode
protected void setCharCode(int charCode)
Sets the char code associated with the event.- Parameters:
charCode- the char code associated with the event
-
getWhich
public int getWhich()
Returns the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.
-
setWhich
protected void setWhich(int which)
Sets the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.- Parameters:
which- the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed
-
getKeyCode
public int getKeyCode()
Returns the key code associated with the event. Overridden to modify browser configurations.- Overrides:
getKeyCodein classEvent- Returns:
- the key code associated with the event
-
isShiftKey
public boolean isShiftKey()
Returns whetherSHIFThas been pressed during this event or not.- Overrides:
isShiftKeyin classEvent- Returns:
- whether
SHIFThas been pressed during this event or not
-
isCtrlKey
public boolean isCtrlKey()
Returns whetherCTRLhas been pressed during this event or not.
-
isAltKey
public boolean isAltKey()
Returns whetherALThas been pressed during this event or not.
-
getKey
public java.lang.String getKey()
Returns the value of a key or keys pressed by the user.- Returns:
- the value of a key or keys pressed by the user
-
setKey
protected void setKey(java.lang.String key)
Sets the value of a key or keys pressed by the user.- Parameters:
key- the value of a key or keys pressed by the user
-
getCode
public java.lang.String getCode()
Returns a physical key on the keyboard.- Returns:
- a physical key on the keyboard
-
setCode
protected void setCode(java.lang.String code)
Sets a physical key on the keyboard.- Parameters:
code- a physical key on the keyboard
-
getMetaKey
public boolean getMetaKey()
Returns whether or not the "meta" key was pressed during the event firing.- Returns:
- whether or not the "meta" key was pressed during the event firing
-
setMetaKey
protected void setMetaKey(boolean metaKey)
Sets whether or not the "meta" key was pressed during the event firing.- Parameters:
metaKey- whether or not the "meta" was pressed during the event firing
-
getLocation
public int getLocation()
Returns the location of the key on the keyboard.- Returns:
- the location of the key on the keyboard
-
setLocation
protected void setLocation(int location)
Sets the location of the key on the keyboard.- Parameters:
location- the location of the key on the keyboard
-
isRepeat
public boolean isRepeat()
Returns whether or not the key is being held down such that it is automatically repeating.- Returns:
- whether or not the key is being held down
-
setRepeat
protected void setRepeat(boolean repeat)
Sets whether or not the key is being held down such that it is automatically repeating.- Parameters:
repeat- whether or not the key is being held down
-
getIsComposing
public boolean getIsComposing()
Returns whether or not the event is fired after the compositionstart and before the compositionend events.- Returns:
- whether or not the event is fired while composing
-
setIsComposing
protected void setIsComposing(boolean isComposing)
Sets whether or not this event is fired after the compositionstart and before the compositionend events.- Parameters:
isComposing- whether or not this event is fired while composing
-
-