ThreePipe
    Preparing search index...

    Function parseShortcut

    • Parses a shortcut string: modifiers and a key, joined with +. The modifiers are Mod (Cmd on a Mac, Ctrl on other platforms), Shift and Alt, in any order and case. The key is a key name (Z, Delete, Escape, \, +) or a KeyboardEvent.code (KeyC, Digit1, Backslash). See {@link matchShortcut} for how a key matches. @returns the parsed shortcut, or undefined for a string without a key or with another modifier (Ctrl+Z)

      Parameters

      • shortcut: string

      Returns ParsedShortcut | undefined