10 April 2001

Appendix C: ECMA Script Language Binding

This appendix contains the complete ECMA Script [ECMAScript] binding for the Level 3 Document Object Model Events definitions.

Prototype Object KeyEvent
The KeyEvent class has the following constants:
KeyEvent.DOM_VK_UNDEFINED
This constant is of type Number and its value is 0x0.
KeyEvent.DOM_VK_RIGHT_ALT
This constant is of type Number and its value is 0x01.
KeyEvent.DOM_VK_LEFT_ALT
This constant is of type Number and its value is 0x02.
KeyEvent.DOM_VK_LEFT_CONTROL
This constant is of type Number and its value is 0x03.
KeyEvent.DOM_VK_RIGHT_CONTROL
This constant is of type Number and its value is 0x04.
KeyEvent.DOM_VK_LEFT_SHIFT
This constant is of type Number and its value is 0x05.
KeyEvent.DOM_VK_RIGHT_SHIFT
This constant is of type Number and its value is 0x06.
KeyEvent.DOM_VK_LEFT_META
This constant is of type Number and its value is 0x07.
KeyEvent.DOM_VK_RIGHT_META
This constant is of type Number and its value is 0x08.
KeyEvent.DOM_VK_CAPS_LOCK
This constant is of type Number and its value is 0x09.
KeyEvent.DOM_VK_DELETE
This constant is of type Number and its value is 0x0A.
KeyEvent.DOM_VK_END
This constant is of type Number and its value is 0x0B.
KeyEvent.DOM_VK_ENTER
This constant is of type Number and its value is 0x0C.
KeyEvent.DOM_VK_ESCAPE
This constant is of type Number and its value is 0x0D.
KeyEvent.DOM_VK_HOME
This constant is of type Number and its value is 0x0E.
KeyEvent.DOM_VK_INSERT
This constant is of type Number and its value is 0x0F.
KeyEvent.DOM_VK_NUM_LOCK
This constant is of type Number and its value is 0x10.
KeyEvent.DOM_VK_PAUSE
This constant is of type Number and its value is 0x11.
KeyEvent.DOM_VK_PRINTSCREEN
This constant is of type Number and its value is 0x12.
KeyEvent.DOM_VK_SCROLL_LOCK
This constant is of type Number and its value is 0x13.
KeyEvent.DOM_VK_LEFT
This constant is of type Number and its value is 0x14.
KeyEvent.DOM_VK_RIGHT
This constant is of type Number and its value is 0x15.
KeyEvent.DOM_VK_UP
This constant is of type Number and its value is 0x16.
KeyEvent.DOM_VK_DOWN
This constant is of type Number and its value is 0x17.
KeyEvent.DOM_VK_PAGE_DOWN
This constant is of type Number and its value is 0x18.
KeyEvent.DOM_VK_PAGE_UP
This constant is of type Number and its value is 0x19.
KeyEvent.DOM_VK_F1
This constant is of type Number and its value is 0x1A.
KeyEvent.DOM_VK_F2
This constant is of type Number and its value is 0x1B.
KeyEvent.DOM_VK_F3
This constant is of type Number and its value is 0x1C.
KeyEvent.DOM_VK_F4
This constant is of type Number and its value is 0x1D.
KeyEvent.DOM_VK_F5
This constant is of type Number and its value is 0x1E.
KeyEvent.DOM_VK_F6
This constant is of type Number and its value is 0x1F.
KeyEvent.DOM_VK_F7
This constant is of type Number and its value is 0x20.
KeyEvent.DOM_VK_F8
This constant is of type Number and its value is 0x21.
KeyEvent.DOM_VK_F9
This constant is of type Number and its value is 0x22.
KeyEvent.DOM_VK_F10
This constant is of type Number and its value is 0x23.
KeyEvent.DOM_VK_F11
This constant is of type Number and its value is 0x24.
KeyEvent.DOM_VK_F12
This constant is of type Number and its value is 0x25.
KeyEvent.DOM_VK_F13
This constant is of type Number and its value is 0x26.
KeyEvent.DOM_VK_F14
This constant is of type Number and its value is 0x27.
KeyEvent.DOM_VK_F15
This constant is of type Number and its value is 0x28.
KeyEvent.DOM_VK_F16
This constant is of type Number and its value is 0x29.
KeyEvent.DOM_VK_F17
This constant is of type Number and its value is 0x2A.
KeyEvent.DOM_VK_F18
This constant is of type Number and its value is 0x2B.
KeyEvent.DOM_VK_F19
This constant is of type Number and its value is 0x2C.
KeyEvent.DOM_VK_F20
This constant is of type Number and its value is 0x2D.
KeyEvent.DOM_VK_F21
This constant is of type Number and its value is 0x2E.
KeyEvent.DOM_VK_F22
This constant is of type Number and its value is 0x2F.
KeyEvent.DOM_VK_F23
This constant is of type Number and its value is 0x30.
KeyEvent.DOM_VK_F24
This constant is of type Number and its value is 0x31.
Object KeyEvent
KeyEvent has the all the properties and methods of the UIEvent object as well as the properties and methods defined below.
The KeyEvent object has the following properties:
outputString
This property is of type String.
keyVal
This property is of type Number.
virtKeyVal
This property is of type Number.
inputGenerated
This property is of type Boolean.
numPad
This property is of type Boolean.
The KeyEvent object has the following methods:
checkModifier(modifer)
This method returns a Boolean.
The modifer parameter is of type Number.
initKeyEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, outputStringArg, keyValArg, virtKeyValArg, inputGeneratedArg, numPadArg)
This method has no return value.
The typeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
The viewArg parameter is a AbstractView object.
The detailArg parameter is of type Number.
The outputStringArg parameter is of type String.
The keyValArg parameter is of type Number.
The virtKeyValArg parameter is of type Number.
The inputGeneratedArg parameter is of type Boolean.
The numPadArg parameter is of type Boolean.
initModifier(modifier, value)
This method has no return value.
The modifier parameter is of type Number.
The value parameter is of type Boolean.
Object EventGroup
The EventGroup object has the following methods:
isSameEventGroup(eventGroup)
This method returns a Boolean.
The eventGroup parameter is a EventGroup object.
Object EventTargetGroup
The EventTargetGroup object has the following methods:
addEventListener(type, listener, useCapture, eventGroup)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
The eventGroup parameter is a EventGroup object.
removeEventListener(type, listener, useCapture, eventGroup)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
The eventGroup parameter is a EventGroup object.
Object DocumentEventGroup
The DocumentEventGroup object has the following methods:
createEventGroup()
This method returns a EventGroup object.