Waze Map Editor JavaScript SDK
    Preparing search index...

    Class Shortcuts

    Methods for defining shortcuts.

    Index

    Methods

    • Parameters

      • args: { shortcutKeys: string }
        • shortcutKeys: string

          The shortcut key combination to test

      Returns boolean

      true if a shortcut key combination is already in use, otherwise false

    • Add a new keyboard shortcut to the group. Passing a shortcut with empty shortcutKeys does not register it. Changing the shortcut keys will not change the shortcut if already set, the previous shortcut should be removed first.

      Parameters

      Returns void

      InvalidStateError if the shortcut with provided shortcutId already exists

      InvalidStateError if the keys combination are already in use

    • Remove the shortcut by shortcut id.

      Parameters

      • args: { shortcutId: string }
        • shortcutId: string

          An id of the shortcut to delete.

      Returns void

      InvalidStateError if the shortcut doesn't exist

      InvalidStateError if the shortcut isn't a userscript shortcut

      InvalidStateError if the shortcut wasn't created by the current userscript

    • Parameters

      • args: { shortcutId: string }
        • shortcutId: string

          An id of the shortcut to check.

      Returns boolean

      true if a shortcut with specified id is already registered.