KeyboardEvent
Extends
Implements
Constructors
new KeyboardEvent()
new KeyboardEvent(type, options?): KeyboardEvent
Parameters
| Parameter | Type |
|---|---|
type | string |
options? | KeyboardEventInit |
Returns
Overrides
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
AT_TARGET | readonly | 2 | globalThis.KeyboardEvent.AT_TARGET UIEvent.AT_TARGET |
BUBBLING_PHASE | readonly | 3 | globalThis.KeyboardEvent.BUBBLING_PHASE UIEvent.BUBBLING_PHASE |
CAPTURING_PHASE | readonly | 1 | globalThis.KeyboardEvent.CAPTURING_PHASE UIEvent.CAPTURING_PHASE |
DOM_KEY_LOCATION_LEFT | readonly | 1 | - |
DOM_KEY_LOCATION_NUMPAD | readonly | 3 | - |
DOM_KEY_LOCATION_RIGHT | readonly | 2 | - |
DOM_KEY_LOCATION_STANDARD | readonly | 0 | - |
NONE | readonly | 0 | globalThis.KeyboardEvent.NONE UIEvent.NONE |
bubbles | readonly | boolean | globalThis.KeyboardEvent.bubbles UIEvent.bubbles |
cancelBubble | public | boolean | globalThis.KeyboardEvent.cancelBubble UIEvent.cancelBubble |
cancelable | readonly | boolean | globalThis.KeyboardEvent.cancelable UIEvent.cancelable |
charCode | readonly | number | - |
composed | readonly | boolean | globalThis.KeyboardEvent.composed UIEvent.composed |
currentTarget | readonly | null | EventTarget | globalThis.KeyboardEvent.currentTarget UIEvent.currentTarget |
defaultPrevented | readonly | boolean | globalThis.KeyboardEvent.defaultPrevented UIEvent.defaultPrevented |
detail | readonly | number | globalThis.KeyboardEvent.detail UIEvent.detail |
eventPhase | readonly | number | globalThis.KeyboardEvent.eventPhase UIEvent.eventPhase |
isComposing | readonly | boolean | - |
isTrusted | readonly | boolean | globalThis.KeyboardEvent.isTrusted UIEvent.isTrusted |
keyCode | readonly | number | - |
location | readonly | number | - |
repeat | readonly | boolean | - |
returnValue | public | boolean | globalThis.KeyboardEvent.returnValue UIEvent.returnValue |
srcElement | readonly | null | EventTarget | globalThis.KeyboardEvent.srcElement UIEvent.srcElement |
target | readonly | null | EventTarget | globalThis.KeyboardEvent.target UIEvent.target |
timeStamp | readonly | number | globalThis.KeyboardEvent.timeStamp UIEvent.timeStamp |
type | readonly | string | globalThis.KeyboardEvent.type UIEvent.type |
view | readonly | null | globalThis.KeyboardEvent.view UIEvent.view |
which | readonly | number | globalThis.KeyboardEvent.which UIEvent.which |
AT_TARGET | readonly | 2 | UIEvent.AT_TARGET |
BUBBLING_PHASE | readonly | 3 | UIEvent.BUBBLING_PHASE |
CAPTURING_PHASE | readonly | 1 | UIEvent.CAPTURING_PHASE |
NONE | readonly | 0 | UIEvent.NONE |
Accessors
altKey
get altKey(): boolean
Returns
boolean
Implementation of
globalThis.KeyboardEvent.altKey
code
get code(): string
Returns
string
Implementation of
globalThis.KeyboardEvent.code
ctrlKey
get ctrlKey(): boolean
Returns
boolean
Implementation of
globalThis.KeyboardEvent.ctrlKey
key
get key(): string
Returns
string
Implementation of
globalThis.KeyboardEvent.key
metaKey
get metaKey(): boolean
Returns
boolean
Implementation of
globalThis.KeyboardEvent.metaKey
shiftKey
get shiftKey(): boolean
Returns
boolean
Implementation of
globalThis.KeyboardEvent.shiftKey
Methods
composedPath()
composedPath(): EventTarget[]
Returns
Implementation of
globalThis.KeyboardEvent.composedPath
Inherited from
getModifierState()
getModifierState(): boolean
Returns
boolean
Implementation of
globalThis.KeyboardEvent.getModifierState
initEvent()
initEvent(type, bubbles?, cancelable?): void
Parameters
| Parameter | Type |
|---|---|
type | string |
bubbles? | boolean |
cancelable? | boolean |
Returns
void
Implementation of
globalThis.KeyboardEvent.initEvent
Inherited from
initKeyboardEvent()
initKeyboardEvent(): void
Returns
void
Implementation of
globalThis.KeyboardEvent.initKeyboardEvent
initUIEvent()
initUIEvent(): void
Returns
void
Implementation of
globalThis.KeyboardEvent.initUIEvent
Inherited from
preventDefault()
preventDefault(): void
Returns
void
Implementation of
globalThis.KeyboardEvent.preventDefault
Inherited from
stopImmediatePropagation()
stopImmediatePropagation(): void
Returns
void
Implementation of
globalThis.KeyboardEvent.stopImmediatePropagation
Inherited from
UIEvent.stopImmediatePropagation
stopPropagation()
stopPropagation(): void
Returns
void
Implementation of
globalThis.KeyboardEvent.stopPropagation