@witchcraft/spellcraft
    Preparing search index...
    • Returns whether the shortcut passed is equal to shortcutA one.

      To return true, their keys, conditions, and commands (depends on the configured manager.options.shortcutEqualityStrategy) must be equal.

      See Manager.options.shortcutEqualityStrategy for details.

      You can temporarily override the strategy witht the third parameter.

      Type Parameters

      Parameters

      • shortcutA: TShortcut
      • shortcutB: Shortcut
      • manager: Pick<Manager, "commands" | "keys"> & PickManager<
            "options",
            "conditionEquals"
            | "shortcutEqualityStrategy"
            | "evaluateCondition",
        >
      • Optionaloverrides: Pick<
            {
                cb: (
                    manager: Manager,
                    error: MultipleErrors<
                        | "MULTIPLE_MATCHING_SHORTCUTS"
                        | "NO_MATCHING_SHORTCUT"
                        | "UNKNOWN_KEY"
                        | "UNKNOWN_KEY_ID"
                        | "UNKNOWN_KEY_EVENT",
                    >,
                    e?: AnyInputEvent,
                ) => void;
                conditionEquals: ConditionComparer;
                enableListeners: boolean;
                enableShortcuts: boolean;
                evaluateCondition: ConditionEvaluator<Context>;
                shortcutEqualityStrategy:
                    | "ignoreCommand"
                    | "ignoreCommandWithDifferentCondition"
                    | "all";
                sorter: IKeysSorter;
                stringifier: IStringifier;
                updateStateOnAllEvents: boolean;
            },
            "shortcutEqualityStrategy",
        >

      Returns shortcutB is TShortcut