Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IKeyboardShortcutManager

Class for adding, accessing, enabling, and disabling keyboard shortcuts.

Hierarchy

  • IKeyboardShortcutManager

Index

Properties

shortcutsEnabled

shortcutsEnabled: boolean

Indicates whether keyboard shortcuts are enabled or not

Methods

addShortcut

  • addShortcut(shortcutName: string, hotkey: IKeyCombination, action: function): boolean
  • Adds a new keyboard shortcut Note: The name and the hotkey must be unique in order for a new shortcut to be created.

    Parameters

    • shortcutName: string

      keyboard shortcut name

    • hotkey: IKeyCombination

      the combination of keys needed to trigger the shortcut action

    • action: function

      the handler to take place when the keyboard shortcut is pressed

        • (): any
        • Returns any

    Returns boolean

    if adding the shortcut was succesful

disableShortcuts

  • disableShortcuts(): void
  • Disables all keyboard shortcuts

    Returns void

enableKeyboardShortcutsOnIframe

  • enableKeyboardShortcutsOnIframe(identifier: string, frame: HTMLIFrameElement): void
  • A public method that allows developers to enable default keyboard shortcut functionality in their card

    Parameters

    • identifier: string

      a string used to identify the frame in mousetrap collection

    • frame: HTMLIFrameElement

      the frame to enable keyboard shortcuts on

    Returns void

enableShortcuts

  • enableShortcuts(): void
  • Enables all keyboard shortcuts

    Returns void

getAvailableShortcuts

  • getAvailableShortcuts(): Map<string, string>
  • Retrieves a mapping of all registered keyboard shortcuts and key mappings.

    Returns Map<string, string>

getShortcutByName

  • Retrieves a IKeyboardShortcut by name

    Parameters

    • shortcutName: string

      Name of the shortcut to retrieve

    Returns IKeyboardShortcut