Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IKeyboardEngineEventData

    The serializable version of IKeyboardEngineEvent, used for "keydown" and "keyup" events.

    interface IKeyboardEngineEventData {
        cancelable: boolean;
        code: string;
        defaultPrevented: boolean;
        immediatePropagationStopped: boolean;
        isComposing: boolean;
        isTrusted: boolean;
        key: string;
        keyCode: number;
        location: number;
        modifiers: IKeyboardModifierStates;
        objectType: EngineEventDataObjectType;
        propagationStopped: boolean;
        readerDocumentEventState: ReaderDocumentEventState;
        readerViewName: string;
        repeated: boolean;
        target: IEngineEventTargetData;
        type: keyof IEngineEventTypeMap;
        userGenerated: boolean;
        willEmitDomEvent: boolean;
    }

    Hierarchy (View Summary)

    Properties

    cancelable: boolean

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

    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.

    See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code for more information.

    defaultPrevented: boolean

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

    immediatePropagationStopped: boolean

    True if stopImmediatePropagation() was called on this event.

    isComposing: boolean

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

    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".

    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.

    See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key for more information.

    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.

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

    location: number

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

    See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/location for more information.

    Contains the state of keyboard modifier keys.

    The type of engine event object this JSON structure represents.

    KEYBOARD_ENGINE_EVENT
    
    propagationStopped: boolean

    True if stopPropagation() was called on this event.

    readerDocumentEventState: ReaderDocumentEventState

    Describes how the reader document acted on the event.

    readerViewName: string

    The name of the ReaderView this event is related to.

    repeated: boolean

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

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

    The type of event.

    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.

    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.