Documentation - v19.2.0-dev
    Preparing search index...

    Class KeyboardShortcutAbstract

    Base class for Keyboard Shortcuts

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean = true

    Indicates whehter the shortcut is enabled

    isToggable: boolean = false

    Accessors

    • get label(): string

      Get translation

      Returns string

    Methods

    • Executes the keyboard shortcuts

      Parameters

      • viewer: Viewer

        The viewer to interact with

      • isHolding: boolean

        Whether the user is holding the keyboard keys combination

        Note: isHolding true means this is at least the second time the function is called for one event loop (down => up)

      Returns Promise<void>

    • Get the shortcut in string format to display it

      Returns string

    • Returns whether the shortcut matches the given input keyboard event state

      Parameters

      • event: KeyboardEvent

      Returns boolean

    • Returns void