1.26.2.1
Gameface
KeyboardEvent Interface Reference
+ Inheritance diagram for KeyboardEvent:

Public Member Functions

KeyboardEvent KeyboardEvent (DOMInternedString type, optional KeyboardEventInit eventInitDict)
 
void initKeyboardEvent ([Default=Undefined] optional DOMInternedString typeArg, [Default=Undefined] optional boolean bubblesArg, [Default=Undefined] optional boolean cancelableArg, [Default=Undefined] optional Window? viewArg, [Default=Undefined] optional DOMString keyIdentifier, [Default=Undefined] optional unsigned long locationArg, [Default=Undefined] optional boolean ctrlKey, [Default=Undefined] optional boolean altKey, [Default=Undefined] optional boolean shiftKey, [Default=Undefined] optional boolean metaKey, [Default=Undefined] optional boolean altGraphKey)
 
boolean getModifierState (DOMString keyIdentifier)
 Queries the state of a modifier using a key value. More...
 
- Public Member Functions inherited from UIEvent
UIEvent UIEvent (DOMInternedString type, optional UIEventInit initEvent)
 
void initUIEvent ([Default=Undefined] optional DOMInternedString type, [Default=Undefined] optional boolean canBubble, [Default=Undefined] optional boolean cancelable, [Default=Undefined] optional Window? view, [Default=Undefined] optional long detail)
 
- Public Member Functions inherited from Event
Event Event (DOMInternedString type, optional EventInit initEvent)
 
void stopPropagation ()
 
void preventDefault ()
 
void initEvent ([Default=Undefined] optional DOMInternedString eventTypeArg, [Default=Undefined] optional boolean canBubbleArg, [Default=Undefined] optional boolean cancelableArg)
 
void stopImmediatePropagation ()
 

Public Attributes

const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00
 
const unsigned long DOM_KEY_LOCATION_LEFT = 0x01
 
const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02
 
const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03
 
readonly attribute unsigned long charCode
 keyCode is deprecated in HTML but a lot of existing code prefers it and it also is the standard thing to use in GT More...
 
readonly attribute unsigned long keyCode
 
readonly attribute unsigned long which
 
readonly attribute unsigned long location
 Returns a Number representing the location of the key on the keyboard or other input device. More...
 
readonly attribute boolean repeat
 Returns a boolean representing if the event is repeating (the user is holding the key down). More...
 
readonly attribute boolean ctrlKey
 
readonly attribute boolean shiftKey
 
readonly attribute boolean altKey
 
readonly attribute boolean metaKey
 
- Public Attributes inherited from Event
const unsigned short NONE = 0
 
const unsigned short CAPTURING_PHASE = 1
 
const unsigned short AT_TARGET = 2
 
const unsigned short BUBBLING_PHASE = 3
 
readonly attribute DOMString type
 
readonly attribute EventTarget target
 
readonly attribute EventTarget currentTarget
 
readonly attribute unsigned short eventPhase
 
readonly attribute boolean bubbles
 
readonly attribute boolean cancelable
 
readonly attribute boolean defaultPrevented
 

Constructor & Destructor Documentation

◆ KeyboardEvent()

KeyboardEvent KeyboardEvent::KeyboardEvent ( DOMInternedString  type,
optional KeyboardEventInit  eventInitDict 
)

Member Function Documentation

◆ getModifierState()

boolean KeyboardEvent::getModifierState ( DOMString  keyIdentifier)

Queries the state of a modifier using a key value.

Parameters
keyIdentifierA modifier key value.
Returns
true if it is a modifier key and the modifier is activated, false otherwise.

◆ initKeyboardEvent()

void KeyboardEvent::initKeyboardEvent ( [Default=Undefined] optional DOMInternedString  typeArg,
[Default=Undefined] optional boolean  bubblesArg,
[Default=Undefined] optional boolean  cancelableArg,
[Default=Undefined] optional Window viewArg,
[Default=Undefined] optional DOMString  keyIdentifier,
[Default=Undefined] optional unsigned long  locationArg,
[Default=Undefined] optional boolean  ctrlKey,
[Default=Undefined] optional boolean  altKey,
[Default=Undefined] optional boolean  shiftKey,
[Default=Undefined] optional boolean  metaKey,
[Default=Undefined] optional boolean  altGraphKey 
)

Member Data Documentation

◆ altKey

readonly attribute boolean KeyboardEvent::altKey

◆ charCode

readonly attribute unsigned long KeyboardEvent::charCode

keyCode is deprecated in HTML but a lot of existing code prefers it and it also is the standard thing to use in GT

◆ ctrlKey

readonly attribute boolean KeyboardEvent::ctrlKey

◆ DOM_KEY_LOCATION_LEFT

const unsigned long KeyboardEvent::DOM_KEY_LOCATION_LEFT = 0x01

◆ DOM_KEY_LOCATION_NUMPAD

const unsigned long KeyboardEvent::DOM_KEY_LOCATION_NUMPAD = 0x03

◆ DOM_KEY_LOCATION_RIGHT

const unsigned long KeyboardEvent::DOM_KEY_LOCATION_RIGHT = 0x02

◆ DOM_KEY_LOCATION_STANDARD

const unsigned long KeyboardEvent::DOM_KEY_LOCATION_STANDARD = 0x00

◆ keyCode

readonly attribute unsigned long KeyboardEvent::keyCode

◆ location

readonly attribute unsigned long KeyboardEvent::location

Returns a Number representing the location of the key on the keyboard or other input device.

◆ metaKey

readonly attribute boolean KeyboardEvent::metaKey

◆ repeat

readonly attribute boolean KeyboardEvent::repeat

Returns a boolean representing if the event is repeating (the user is holding the key down).

◆ shiftKey

readonly attribute boolean KeyboardEvent::shiftKey

◆ which

readonly attribute unsigned long KeyboardEvent::which