Package org.loboevolution.events
Interface KeyboardEvent
- All Known Implementing Classes:
KeyboardEventImpl
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.
The event type (keydown, keypress, or keyup) identifies what kind of keyboard activity occurred.
- See Also:
-
Field Summary
Fields inherited from interface org.loboevolution.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE, NONE
-
Method Summary
Modifier and TypeMethodDescriptionThe KeyboardEvent.altKey read-only property is a Boolean that indicates if the alt key (Option or ⌥ on OS X) was pressed (true) or not (false) when the event occured.The charCode read-only property of the KeyboardEvent interface returns the Unicode value of a character key pressed during a keypress event.getCode()
The KeyboardEvent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key).The KeyboardEvent.ctrlKey read-only property returns a Boolean that indicates if the control key was pressed (true) or not (false) when the event occured.The KeyboardEvent.isComposing read-only property returns a Boolean value indicating if the event is fired within a composition session, i.e. after compositionstart and before compositionend.getKey()
The KeyboardEvent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout.int
The deprecated KeyboardEvent.keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key.The KeyboardEvent.location read-only property returns an unsigned long representing the location of the key on the keyboard or other input device.The KeyboardEvent.metaKey read-only property returning a Boolean that indicates if the Meta key was pressed (true) or not (false) when the event occurred.getModifierState
(String modifierState) The KeyboardEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (that is the modifier key is pressed or locked), otherwise, false.The repeat read-only property of the KeyboardEvent interface returns a Boolean that is true if the given key is being held down such that it is automatically repeating.The KeyboardEvent.shiftKey read-only property is a Boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred.void
initKeyboardEvent
(String typeArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey, boolean shiftKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.void
initKeyboardEvent
(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object.Methods inherited from interface org.loboevolution.events.Event
getBubbles, getCancelable, getComposed, getComposedPath, getCurrentTarget, getDefaultPrevented, getEventPhase, getReturnValue, getSrcElement, getStopImmediatePropagation, getStopPropagation, getTarget, getTimeStamp, getTrusted, getType, initEvent, initEvent, initEvent, preventDefault
Methods inherited from interface org.loboevolution.events.UIEvent
getDetail, getView, getWhich, initUIEvent, initUIEvent, initUIEvent, initUIEvent, initUIEvent
-
Method Details
-
getAltKey
Boolean getAltKey()The KeyboardEvent.altKey read-only property is a Boolean that indicates if the alt key (Option or ⌥ on OS X) was pressed (true) or not (false) when the event occured.- See Also:
-
getCharCode
Double getCharCode()The charCode read-only property of the KeyboardEvent interface returns the Unicode value of a character key pressed during a keypress event.- See Also:
-
getCode
String getCode()The KeyboardEvent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property returns a value that isn't altered by keyboard layout or the state of the modifier keys.- See Also:
-
getCtrlKey
Boolean getCtrlKey()The KeyboardEvent.ctrlKey read-only property returns a Boolean that indicates if the control key was pressed (true) or not (false) when the event occured.- See Also:
-
getIsComposing
Boolean getIsComposing()The KeyboardEvent.isComposing read-only property returns a Boolean value indicating if the event is fired within a composition session, i.e. after compositionstart and before compositionend.- See Also:
-
getKey
String getKey()The KeyboardEvent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout.- See Also:
-
getKeyCode
int getKeyCode()The deprecated KeyboardEvent.keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key.- See Also:
-
getLocation
Double getLocation()The KeyboardEvent.location read-only property returns an unsigned long representing the location of the key on the keyboard or other input device.- See Also:
-
getMetaKey
Boolean getMetaKey()The KeyboardEvent.metaKey read-only property returning a Boolean that indicates if the Meta key was pressed (true) or not (false) when the event occurred. Some operating systems may intercept the key so it is never detected.- See Also:
-
getRepeat
Boolean getRepeat()The repeat read-only property of the KeyboardEvent interface returns a Boolean that is true if the given key is being held down such that it is automatically repeating.- See Also:
-
getShiftKey
Boolean getShiftKey()The KeyboardEvent.shiftKey read-only property is a Boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred.- See Also:
-
getModifierState
The KeyboardEvent.getModifierState() method returns the current state of the specified modifier key: true if the modifier is active (that is the modifier key is pressed or locked), otherwise, false.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey, boolean shiftKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey, boolean altKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg, boolean ctrlKey) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg, Double locationArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
void initKeyboardEvent(String typeArg, Boolean bubblesArg, boolean cancelableArg, Window viewArg, String keyArg) The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-
initKeyboardEvent
The KeyboardEvent.initKeyboardEvent() method initializes the attributes of a keyboard event object. This method was introduced in draft of DOM Level 3 Events, but deprecated in newer draft. Gecko won't support this feature since implementing this method as experimental broke existing web apps (see bug 999645). Web applications should use constructor instead of this if it's available.- See Also:
-