public class KeyboardEvent extends UIEvent
Modifier and Type | Field and Description |
---|---|
static int |
DOM_VK_0
Constant for DOM_VK_0.
|
static int |
DOM_VK_1
Constant for DOM_VK_1.
|
static int |
DOM_VK_2
Constant for DOM_VK_2.
|
static int |
DOM_VK_3
Constant for DOM_VK_3.
|
static int |
DOM_VK_4
Constant for DOM_VK_4.
|
static int |
DOM_VK_5
Constant for DOM_VK_5.
|
static int |
DOM_VK_6
Constant for DOM_VK_6.
|
static int |
DOM_VK_7
Constant for DOM_VK_7.
|
static int |
DOM_VK_8
Constant for DOM_VK_8.
|
static int |
DOM_VK_9
Constant for DOM_VK_9.
|
static int |
DOM_VK_A
Constant for DOM_VK_A.
|
static int |
DOM_VK_ADD
Constant for DOM_VK_ADD.
|
static int |
DOM_VK_ALT
Constant for DOM_VK_ALT.
|
static int |
DOM_VK_B
Constant for DOM_VK_B.
|
static int |
DOM_VK_BACK_QUOTE
Constant for DOM_VK_BACK_QUOTE.
|
static int |
DOM_VK_BACK_SLASH
Constant for DOM_VK_BACK_SLASH.
|
static int |
DOM_VK_BACK_SPACE
Constant for DOM_VK_BACK_SPACE.
|
static int |
DOM_VK_C
Constant for DOM_VK_C.
|
static int |
DOM_VK_CANCEL
Constant for DOM_VK_CANCEL.
|
static int |
DOM_VK_CAPS_LOCK
Constant for DOM_VK_CAPS_LOCK.
|
static int |
DOM_VK_CLEAR
Constant for DOM_VK_CLEAR.
|
static int |
DOM_VK_CLOSE_BRACKET
Constant for DOM_VK_CLOSE_BRACKET.
|
static int |
DOM_VK_COMMA
Constant for DOM_VK_COMMA.
|
static int |
DOM_VK_CONTEXT_MENU
Constant for DOM_VK_CONTEXT_MENU.
|
static int |
DOM_VK_CONTROL
Constant for DOM_VK_CONTROL.
|
static int |
DOM_VK_D
Constant for DOM_VK_D.
|
static int |
DOM_VK_DECIMAL
Constant for DOM_VK_DECIMAL.
|
static int |
DOM_VK_DELETE
Constant for DOM_VK_DELETE.
|
static int |
DOM_VK_DIVIDE
Constant for DOM_VK_DIVIDE.
|
static int |
DOM_VK_DOWN
Constant for DOM_VK_DOWN.
|
static int |
DOM_VK_E
Constant for DOM_VK_E.
|
static int |
DOM_VK_END
Constant for DOM_VK_END.
|
static int |
DOM_VK_ENTER
Constant for DOM_VK_ENTER.
|
static int |
DOM_VK_EQUALS
Constant for DOM_VK_EQUALS.
|
static int |
DOM_VK_ESCAPE
Constant for DOM_VK_ESCAPE.
|
static int |
DOM_VK_F
Constant for DOM_VK_F.
|
static int |
DOM_VK_F1
Constant for DOM_VK_F1.
|
static int |
DOM_VK_F10
Constant for DOM_VK_F10.
|
static int |
DOM_VK_F11
Constant for DOM_VK_F11.
|
static int |
DOM_VK_F12
Constant for DOM_VK_F12.
|
static int |
DOM_VK_F13
Constant for DOM_VK_F13.
|
static int |
DOM_VK_F14
Constant for DOM_VK_F14.
|
static int |
DOM_VK_F15
Constant for DOM_VK_F15.
|
static int |
DOM_VK_F16
Constant for DOM_VK_F16.
|
static int |
DOM_VK_F17
Constant for DOM_VK_F17.
|
static int |
DOM_VK_F18
Constant for DOM_VK_F18.
|
static int |
DOM_VK_F19
Constant for DOM_VK_F19.
|
static int |
DOM_VK_F2
Constant for DOM_VK_F2.
|
static int |
DOM_VK_F20
Constant for DOM_VK_F20.
|
static int |
DOM_VK_F21
Constant for DOM_VK_F21.
|
static int |
DOM_VK_F22
Constant for DOM_VK_F22.
|
static int |
DOM_VK_F23
Constant for DOM_VK_F23.
|
static int |
DOM_VK_F24
Constant for DOM_VK_F24.
|
static int |
DOM_VK_F3
Constant for DOM_VK_F3.
|
static int |
DOM_VK_F4
Constant for DOM_VK_F4.
|
static int |
DOM_VK_F5
Constant for DOM_VK_F5.
|
static int |
DOM_VK_F6
Constant for DOM_VK_F6.
|
static int |
DOM_VK_F7
Constant for DOM_VK_F7.
|
static int |
DOM_VK_F8
Constant for DOM_VK_F8.
|
static int |
DOM_VK_F9
Constant for DOM_VK_F9.
|
static int |
DOM_VK_G
Constant for DOM_VK_G.
|
static int |
DOM_VK_H
Constant for DOM_VK_H.
|
static int |
DOM_VK_HELP
Constant for DOM_VK_HELP.
|
static int |
DOM_VK_HOME
Constant for DOM_VK_HOME.
|
static int |
DOM_VK_I
Constant for DOM_VK_I.
|
static int |
DOM_VK_INSERT
Constant for DOM_VK_INSERT.
|
static int |
DOM_VK_J
Constant for DOM_VK_J.
|
static int |
DOM_VK_K
Constant for DOM_VK_K.
|
static int |
DOM_VK_L
Constant for DOM_VK_L.
|
static int |
DOM_VK_LEFT
Constant for DOM_VK_LEFT.
|
static int |
DOM_VK_M
Constant for DOM_VK_M.
|
static int |
DOM_VK_META
Constant for DOM_VK_META.
|
static int |
DOM_VK_MULTIPLY
Constant for DOM_VK_MULTIPLY.
|
static int |
DOM_VK_N
Constant for DOM_VK_N.
|
static int |
DOM_VK_NUM_LOCK
Constant for DOM_VK_NUM_LOCK.
|
static int |
DOM_VK_NUMPAD0
Constant for DOM_VK_NUMPAD0.
|
static int |
DOM_VK_NUMPAD1
Constant for DOM_VK_NUMPAD1.
|
static int |
DOM_VK_NUMPAD2
Constant for DOM_VK_NUMPAD2.
|
static int |
DOM_VK_NUMPAD3
Constant for DOM_VK_NUMPAD3.
|
static int |
DOM_VK_NUMPAD4
Constant for DOM_VK_NUMPAD4.
|
static int |
DOM_VK_NUMPAD5
Constant for DOM_VK_NUMPAD5.
|
static int |
DOM_VK_NUMPAD6
Constant for DOM_VK_NUMPAD6.
|
static int |
DOM_VK_NUMPAD7
Constant for DOM_VK_NUMPAD7.
|
static int |
DOM_VK_NUMPAD8
Constant for DOM_VK_NUMPAD8.
|
static int |
DOM_VK_NUMPAD9
Constant for DOM_VK_NUMPAD9.
|
static int |
DOM_VK_O
Constant for DOM_VK_O.
|
static int |
DOM_VK_OPEN_BRACKET
Constant for DOM_VK_OPEN_BRACKET.
|
static int |
DOM_VK_P
Constant for DOM_VK_P.
|
static int |
DOM_VK_PAGE_DOWN
Constant for DOM_VK_PAGE_DOWN.
|
static int |
DOM_VK_PAGE_UP
Constant for DOM_VK_PAGE_UP.
|
static int |
DOM_VK_PAUSE
Constant for DOM_VK_PAUSE.
|
static int |
DOM_VK_PERIOD
Constant for DOM_VK_PERIOD.
|
static int |
DOM_VK_PRINTSCREEN
Constant for DOM_VK_PRINTSCREEN.
|
static int |
DOM_VK_Q
Constant for DOM_VK_Q.
|
static int |
DOM_VK_QUOTE
Constant for DOM_VK_QUOTE.
|
static int |
DOM_VK_R
Constant for DOM_VK_R.
|
static int |
DOM_VK_RETURN
Constant for DOM_VK_RETURN.
|
static int |
DOM_VK_RIGHT
Constant for DOM_VK_RIGHT.
|
static int |
DOM_VK_S
Constant for DOM_VK_S.
|
static int |
DOM_VK_SCROLL_LOCK
Constant for DOM_VK_SCROLL_LOCK.
|
static int |
DOM_VK_SEMICOLON
Constant for DOM_VK_SEMICOLON.
|
static int |
DOM_VK_SEPARATOR
Constant for DOM_VK_SEPARATOR.
|
static int |
DOM_VK_SHIFT
Constant for DOM_VK_SHIFT.
|
static int |
DOM_VK_SLASH
Constant for DOM_VK_SLASH.
|
static int |
DOM_VK_SPACE
Constant for DOM_VK_SPACE.
|
static int |
DOM_VK_SUBTRACT
Constant for DOM_VK_SUBTRACT.
|
static int |
DOM_VK_T
Constant for DOM_VK_T.
|
static int |
DOM_VK_TAB
Constant for DOM_VK_TAB.
|
static int |
DOM_VK_U
Constant for DOM_VK_U.
|
static int |
DOM_VK_UP
Constant for DOM_VK_UP.
|
static int |
DOM_VK_V
Constant for DOM_VK_V.
|
static int |
DOM_VK_W
Constant for DOM_VK_W.
|
static int |
DOM_VK_X
Constant for DOM_VK_X.
|
static int |
DOM_VK_Y
Constant for DOM_VK_Y.
|
static int |
DOM_VK_Z
Constant for DOM_VK_Z.
|
ABORT, ALT_MASK, AT_TARGET, BACK, BLUR, BUBBLING_PHASE, CAPTURING_PHASE, CHANGE, CLICK, CONTROL_MASK, DBLCLICK, DRAGDROP, ERROR, FOCUS, FORWARD, HELP, KEY_CURRENT_EVENT, KEYDOWN, KEYPRESS, KEYUP, LOAD, LOCATE, META_MASK, MOUSEDOWN, MOUSEDRAG, MOUSEMOVE, MOUSEOUT, MOUSEOVER, MOUSEUP, MOVE, NONE, RESET, RESIZE, SCROLL, SELECT, SHIFT_MASK, SUBMIT, TEXT, TYPE_BEFORE_UNLOAD, TYPE_BLUR, TYPE_CHANGE, TYPE_DOM_DOCUMENT_LOADED, TYPE_ERROR, TYPE_FOCUS, TYPE_FOCUS_IN, TYPE_FOCUS_OUT, TYPE_HASH_CHANGE, TYPE_INPUT, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LOAD, TYPE_MESSAGE, TYPE_PROPERTY_CHANGE, TYPE_READY_STATE_CHANGE, TYPE_RESET, TYPE_SUBMIT, TYPE_UNLOAD, UNLOAD, XFER_DONE
Constructor and Description |
---|
KeyboardEvent()
Creates a new keyboard event instance.
|
KeyboardEvent(DomNode domNode,
String type,
char character,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Creates a new keyboard event instance.
|
KeyboardEvent(DomNode domNode,
String type,
int keyCode,
boolean shiftKey,
boolean ctrlKey,
boolean altKey)
Creates a new keyboard event instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAltKey()
Overridden to modify browser configurations.
|
int |
getCharCode()
Returns the char code associated with the event.
|
boolean |
getCtrlKey()
Overridden to modify browser configurations.
|
Object |
getKeyCode()
Returns the key code associated with the event.
|
boolean |
getShiftKey()
Overridden to modify browser configurations.
|
Object |
getWhich()
Returns the numeric keyCode of the key pressed, or the charCode for an alphanumeric key pressed.
|
void |
initKeyEvent(String type,
boolean bubbles,
boolean cancelable,
Object view,
boolean ctrlKey,
boolean altKey,
boolean shiftKey,
boolean metaKey,
int keyCode,
int charCode)
Implementation of the DOM Level 3 Event method for initializing the key event.
|
getCancelBubble, getDetail, getMetaKey, getView, initUIEvent, setCancelBubble, setDetail, setMetaKey
applies, createPropertyChangeEvent, endFire, eventCreated, getBubbles, getCancelable, getCurrentTarget, getDefaultPrevented, getEventPhase, getPropertyName, getReturnValue, getSrcElement, getTarget, getTimeStamp, getType, initEvent, isAborted, isPropagationStopped, jsConstructor, preventDefault, setAltKey, setBubbles, setCancelable, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setKeyCode, setReturnValue, setShiftKey, setSrcElement, setTarget, setType, startFire, stopPropagation, toString
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setClassName, setDomNode, setDomNode, setHtmlElement, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public static final int DOM_VK_MULTIPLY
public static final int DOM_VK_ADD
public static final int DOM_VK_SEPARATOR
public static final int DOM_VK_SUBTRACT
public static final int DOM_VK_DECIMAL
public static final int DOM_VK_DIVIDE
public static final int DOM_VK_F1
public static final int DOM_VK_F2
public static final int DOM_VK_F3
public static final int DOM_VK_F4
public static final int DOM_VK_F5
public static final int DOM_VK_F6
public static final int DOM_VK_F7
public static final int DOM_VK_F8
public static final int DOM_VK_CLEAR
public static final int DOM_VK_F9
public static final int DOM_VK_F10
public static final int DOM_VK_F11
public static final int DOM_VK_F12
public static final int DOM_VK_F13
public static final int DOM_VK_F14
public static final int DOM_VK_F15
public static final int DOM_VK_F16
public static final int DOM_VK_F17
public static final int DOM_VK_F18
public static final int DOM_VK_RETURN
public static final int DOM_VK_F19
public static final int DOM_VK_F20
public static final int DOM_VK_F21
public static final int DOM_VK_F22
public static final int DOM_VK_F23
public static final int DOM_VK_F24
public static final int DOM_VK_ENTER
public static final int DOM_VK_NUM_LOCK
public static final int DOM_VK_SCROLL_LOCK
public static final int DOM_VK_SHIFT
public static final int DOM_VK_CONTROL
public static final int DOM_VK_ALT
public static final int DOM_VK_COMMA
public static final int DOM_VK_PAUSE
public static final int DOM_VK_PERIOD
public static final int DOM_VK_SLASH
public static final int DOM_VK_BACK_QUOTE
public static final int DOM_VK_CAPS_LOCK
public static final int DOM_VK_OPEN_BRACKET
public static final int DOM_VK_BACK_SLASH
public static final int DOM_VK_CLOSE_BRACKET
public static final int DOM_VK_QUOTE
public static final int DOM_VK_META
public static final int DOM_VK_ESCAPE
public static final int DOM_VK_CANCEL
public static final int DOM_VK_SPACE
public static final int DOM_VK_PAGE_UP
public static final int DOM_VK_PAGE_DOWN
public static final int DOM_VK_END
public static final int DOM_VK_HOME
public static final int DOM_VK_LEFT
public static final int DOM_VK_UP
public static final int DOM_VK_RIGHT
public static final int DOM_VK_DOWN
public static final int DOM_VK_PRINTSCREEN
public static final int DOM_VK_INSERT
public static final int DOM_VK_DELETE
public static final int DOM_VK_0
public static final int DOM_VK_1
public static final int DOM_VK_2
public static final int DOM_VK_3
public static final int DOM_VK_4
public static final int DOM_VK_5
public static final int DOM_VK_6
public static final int DOM_VK_7
public static final int DOM_VK_8
public static final int DOM_VK_9
public static final int DOM_VK_SEMICOLON
public static final int DOM_VK_HELP
public static final int DOM_VK_EQUALS
public static final int DOM_VK_A
public static final int DOM_VK_B
public static final int DOM_VK_C
public static final int DOM_VK_D
public static final int DOM_VK_E
public static final int DOM_VK_F
public static final int DOM_VK_G
public static final int DOM_VK_H
public static final int DOM_VK_I
public static final int DOM_VK_J
public static final int DOM_VK_K
public static final int DOM_VK_L
public static final int DOM_VK_M
public static final int DOM_VK_N
public static final int DOM_VK_O
public static final int DOM_VK_BACK_SPACE
public static final int DOM_VK_P
public static final int DOM_VK_Q
public static final int DOM_VK_R
public static final int DOM_VK_S
public static final int DOM_VK_T
public static final int DOM_VK_U
public static final int DOM_VK_V
public static final int DOM_VK_W
public static final int DOM_VK_X
public static final int DOM_VK_Y
public static final int DOM_VK_TAB
public static final int DOM_VK_Z
public static final int DOM_VK_CONTEXT_MENU
public static final int DOM_VK_NUMPAD0
public static final int DOM_VK_NUMPAD1
public static final int DOM_VK_NUMPAD2
public static final int DOM_VK_NUMPAD3
public static final int DOM_VK_NUMPAD4
public static final int DOM_VK_NUMPAD5
public static final int DOM_VK_NUMPAD6
public static final int DOM_VK_NUMPAD7
public static final int DOM_VK_NUMPAD8
public static final int DOM_VK_NUMPAD9
public KeyboardEvent()
public KeyboardEvent(DomNode domNode, String type, char character, boolean shiftKey, boolean ctrlKey, boolean altKey)
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 pressedpublic KeyboardEvent(DomNode domNode, String type, int keyCode, boolean shiftKey, boolean ctrlKey, boolean altKey)
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 pressedpublic void initKeyEvent(String type, boolean bubbles, boolean cancelable, Object view, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey, int keyCode, int charCode)
type
- the event typebubbles
- can the event bubblecancelable
- can the event be canceledview
- the view to use for this eventctrlKey
- is the control key pressedaltKey
- is the alt key pressedshiftKey
- is the shift key pressedmetaKey
- is the meta key pressedkeyCode
- the virtual key code value of the key which was depressed, otherwise zerocharCode
- the Unicode character associated with the depressed key otherwise zeropublic int getCharCode()
public Object getWhich()
public Object getKeyCode()
getKeyCode
in class Event
public boolean getShiftKey()
UIEvent
getShiftKey
in class UIEvent
public boolean getCtrlKey()
UIEvent
getCtrlKey
in class UIEvent
Copyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.