ComPDFKit Web SDK
    Preparing search index...

    Namespace hotkeys

    UI.hotkeys: keyboard shortcut controls for this instance.

    • on(key?, handler?): registers a custom handler (a function is called on keydown; { keydown, keyup } is called on each). Without a handler, binds the key to its built-in shortcut (for example Keys.CTRL_EQUAL zooms in). Without arguments, resumes all shortcuts. Keys are written like ctrl+shift+=, comma-separated for several.
    • off(key?, handler?): removes the key's custom handlers and stops its built-in shortcut; with a handler, removes only that one. Without arguments, pauses all shortcuts.
    • trigger(key, eventType?): runs the handler bound in the key map without a real key press; eventType is 'keydown' (default) or 'keyup'.
    off
    on
    trigger
    EventTypes
    Keys