@stereograph/teiaviewer - v17.8.0-dev
    Preparing search index...

    Class MoveCameraShortcut

    Base class for Keyboard Shortcuts

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • keys: Set<string>
      • direction:
            | "Up"
            | "Down"
            | "Left"
            | "Right"
            | "UpLeft"
            | "UpRight"
            | "DownLeft"
            | "DownRight"
      • shortcutEquivalences: Partial<Record<"unknown" | "azerty" | "qwerty", Set<string>>> = {}
      • modifiers: Partial<KeyboardShortcutModifiers> = {}

      Returns MoveCameraShortcut

    Properties

    isToggable: boolean = false
    keys: Set<string> = ...
    modifiers: KeyboardShortcutModifiers = ...
    name: "MoveCameraShortcut" = 'MoveCameraShortcut'

    Accessors

    • get translation(): 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

      Parameters

      • keyboardType: "unknown" | "azerty" | "qwerty"

      Returns string

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

      Parameters

      • event: KeyboardEvent
      • holdingKeys: Set<string>
      • holdingCodes: Set<string>

      Returns boolean