Options
All
  • Public
  • Public/Protected
  • All
Menu

Used for keyboard engine events such as "keydown" and "keyup".

Hierarchy

Index

Properties

Readonly cancelable

cancelable: boolean

If this event's default action is cancelable. See respective engine event for its definition of default action.

Readonly code

code: string

Represents a physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property returns a value that isn't altered by keyboard layout or the state of the modifier keys.

Readonly defaultPrevented

defaultPrevented: boolean

If this event's default action has been canceled/prevented by a call to preventDefault()

Readonly immediatePropagationStopped

immediatePropagationStopped: boolean

True if stopImmediatePropagation() was called on this event.

Readonly isComposing

isComposing: boolean

Indicates if the event was fired within a composition session, i.e. between "compositionstart" and "compositionend"

Readonly isTrusted

isTrusted: boolean

If this event runs in a "trusted" context, i.e. the event callback is executed during a user-generated event such as "click" or "pointerdown".

Readonly key

key: string

Returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout.

Readonly keyCode

keyCode: number

Represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key. This is usually the decimal ASCII (RFC 20) or Windows 1252 code corresponding to the key. If the key can't be identified, this value is 0.

deprecated

This feature has been removed from the web standards. Use the code or key property instead.

Readonly location

location: number

A number representing the location of the key on the keyboard or other input device.

Readonly modifiers

Contains the state of keyboard modifier keys.

Readonly propagationStopped

propagationStopped: boolean

True if stopPropagation() was called on this event.

Readonly readerDocumentEventState

readerDocumentEventState: ReaderDocumentEventState

Describes how the reader document acted on the event.

Readonly readerView

readerView: IReaderView

The ReaderView instance this event is related to.

Readonly repeated

repeated: boolean

Indicates if the given key is being held down such that it is automatically repeating.

Readonly target

Contains additional information about the original event target, such as the targeted node in the reader document.

Readonly type

The type of event.

Readonly userGenerated

userGenerated: boolean

If the event was emitted due to a user generated event.

Note that if this value is true, the engine event listener might still be called in an untrusted execution context due to proxying through iframes, etc. Use isTrusted() to verify if the current execution context is trusted.

Readonly willEmitDomEvent

willEmitDomEvent: boolean

If true, a native DOM event with the same type as this engine event will also be fired in your app.

If you are also listening on the corresponding DOM event, use this value to ensure that you are not handling the same event twice.

For example, when performing a "click" inside an EPUB reader document, the DOM "click" event will not be visible to your app because the document is rendered in an iframe. However, a click on the edge of an EPUB reader document will generate a normal DOM "click" event AND also a Colibrio "click" engine event.

Methods

preventDefault

  • preventDefault(): void

stopImmediatePropagation

  • stopImmediatePropagation(): void

stopPropagation

  • stopPropagation(): void
  • Stops this event from propagating to listeners on the ReadingSystemEngine instance, if called from a listener added to a ReaderView instance. If the event has already propagated to the ReadingSystemEngine instance, calling this method has no effect.

    Returns void

toJSON

Generated using TypeDoc