API Reference
@univerjs
@univerjs/engine-render
interfaces
Ikeyboardevent

@univerjs/engine-render v0.1.17Docs


Interface: IKeyboardEvent

Native friendly interface for KeyboardEvent Object

Extends

Properties

PropertyModifierTypeDescriptionInherited fromDefined in
AT_TARGETreadonly2-IUIEvent.AT_TARGETnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8226
BUBBLING_PHASEreadonly3-IUIEvent.BUBBLING_PHASEnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8227
CAPTURING_PHASEreadonly1-IUIEvent.CAPTURING_PHASEnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8225
NONEreadonly0-IUIEvent.NONEnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8224
altKeypublicbooleanStatus of Alt key being pressed-submodules/univer/packages/engine-render/src/basics/i-events.ts:142 (opens in a new tab)
bubblesreadonlybooleanReturns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. MDN Reference (opens in a new tab)IUIEvent.bubblesnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8121
cancelBubblepublicbooleanDeprecated MDN Reference (opens in a new tab)IUIEvent.cancelBubblenode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8127
cancelablereadonlybooleanReturns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. MDN Reference (opens in a new tab)IUIEvent.cancelablenode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8133
charCode?publicnumberUnicode value of character pressed Deprecated-submodules/univer/packages/engine-render/src/basics/i-events.ts:148 (opens in a new tab)
codepublicstringCode for key based on layout-submodules/univer/packages/engine-render/src/basics/i-events.ts:153 (opens in a new tab)
composedreadonlybooleanReturns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. MDN Reference (opens in a new tab)IUIEvent.composednode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8139
ctrlKeypublicbooleanStatus of Ctrl key being pressed-submodules/univer/packages/engine-render/src/basics/i-events.ts:158 (opens in a new tab)
currentStatepublicNullable<number>Current state of given inputIUIEvent.currentStatesubmodules/univer/packages/engine-render/src/basics/i-events.ts:122 (opens in a new tab)
currentTargetreadonlynull | EventTargetReturns the object whose event listener's callback is currently being invoked. MDN Reference (opens in a new tab)IUIEvent.currentTargetnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8145
defaultPreventedreadonlybooleanReturns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. MDN Reference (opens in a new tab)IUIEvent.defaultPreventednode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8151
detailreadonlynumberMDN Reference (opens in a new tab)IUIEvent.detailnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:22847
deviceTypepublicDeviceTypeDevice typeIUIEvent.deviceTypesubmodules/univer/packages/engine-render/src/basics/i-events.ts:110 (opens in a new tab)
eventPhasereadonlynumberReturns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. MDN Reference (opens in a new tab)IUIEvent.eventPhasenode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8157
inputIndexpublicnumberDevice slotIUIEvent.inputIndexsubmodules/univer/packages/engine-render/src/basics/i-events.ts:114 (opens in a new tab)
isTrustedreadonlybooleanReturns true if event was dispatched by the user agent, and false otherwise. MDN Reference (opens in a new tab)IUIEvent.isTrustednode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8163
keypublicstringString representation of key-submodules/univer/packages/engine-render/src/basics/i-events.ts:163 (opens in a new tab)
keyCodepublicnumber--submodules/univer/packages/engine-render/src/basics/i-events.ts:168 (opens in a new tab)
metaKeypublicbooleanStatus of Meta key (eg. Windows key) being pressed-submodules/univer/packages/engine-render/src/basics/i-events.ts:173 (opens in a new tab)
previousStatepublicNullable<number>Previous state of given inputIUIEvent.previousStatesubmodules/univer/packages/engine-render/src/basics/i-events.ts:118 (opens in a new tab)
returnValuepublicbooleanDeprecated MDN Reference (opens in a new tab)IUIEvent.returnValuenode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8169
shiftKeypublicbooleanStatus of Shift key being pressed-submodules/univer/packages/engine-render/src/basics/i-events.ts:178 (opens in a new tab)
srcElementreadonlynull | EventTargetDeprecated MDN Reference (opens in a new tab)IUIEvent.srcElementnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8175
targetreadonlynull | EventTargetReturns the object to which event is dispatched (its target). MDN Reference (opens in a new tab)IUIEvent.targetnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8181
timeStampreadonlynumberReturns the event's timestamp as the number of milliseconds measured relative to the time origin. MDN Reference (opens in a new tab)IUIEvent.timeStampnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8187
typereadonlystringReturns the type of event, e.g. "click", "hashchange", or "submit". MDN Reference (opens in a new tab)IUIEvent.typenode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8193
viewreadonlynull | WindowMDN Reference (opens in a new tab)IUIEvent.viewnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:22849
whichreadonlynumberDeprecated MDN Reference (opens in a new tab)IUIEvent.whichnode_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:22855

Methods

composedPath()

composedPath(undefined)

composedPath(): EventTarget[]

Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.

MDN Reference (opens in a new tab)

Returns

EventTarget[]

Inherited from

IUIEvent.composedPath

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8199

composedPath(undefined)

composedPath(): EventTarget[]

Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.

MDN Reference (opens in a new tab)

Returns

EventTarget[]

Inherited from

IUIEvent.composedPath

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.webworker.d.ts:2523


initEvent()

initEvent(type, bubbles, cancelable)

initEvent(
   type, 
   bubbles?, 
   cancelable?): void
Parameters
ParameterType
typestring
bubbles?boolean
cancelable?boolean
Returns

void

Inherited from

IUIEvent.initEvent

Deprecated

MDN Reference (opens in a new tab)

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8205

initEvent(type, bubbles, cancelable)

initEvent(
   type, 
   bubbles?, 
   cancelable?): void
Parameters
ParameterType
typestring
bubbles?boolean
cancelable?boolean
Returns

void

Inherited from

IUIEvent.initEvent

Deprecated

MDN Reference (opens in a new tab)

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.webworker.d.ts:2529


initUIEvent()

initUIEvent(
   typeArg, 
   bubblesArg?, 
   cancelableArg?, 
   viewArg?, 
   detailArg?): void

Parameters

ParameterType
typeArgstring
bubblesArg?boolean
cancelableArg?boolean
viewArg?null | Window
detailArg?number

Returns

void

Inherited from

IUIEvent.initUIEvent

Deprecated

MDN Reference (opens in a new tab)

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:22861


preventDefault()

preventDefault(undefined)

preventDefault(): void

If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.preventDefault

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8211

preventDefault(undefined)

preventDefault(): void

If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.preventDefault

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.webworker.d.ts:2535


stopImmediatePropagation()

stopImmediatePropagation(undefined)

stopImmediatePropagation(): void

Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.stopImmediatePropagation

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8217

stopImmediatePropagation(undefined)

stopImmediatePropagation(): void

Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.stopImmediatePropagation

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.webworker.d.ts:2541


stopPropagation()

stopPropagation(undefined)

stopPropagation(): void

When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.stopPropagation

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.dom.d.ts:8223

stopPropagation(undefined)

stopPropagation(): void

When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.

MDN Reference (opens in a new tab)

Returns

void

Inherited from

IUIEvent.stopPropagation

Defined in

node_modules/.pnpm/typescript@5.5.2/node_modules/typescript/lib/lib.webworker.d.ts:2547


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.