import { normalizeKey } from "./parser.js";
export function matchKeystroke(expected, actual) {
    const actualKey = normalizeKey(actual.name ?? actual.input ?? "");
    return actualKey === normalizeKey(expected.key ?? "") &&
        Boolean(actual.ctrl) === Boolean(expected.ctrl) &&
        Boolean(actual.alt) === Boolean(expected.alt) &&
        Boolean(actual.meta) === Boolean(expected.meta) &&
        Boolean(actual.shift) === Boolean(expected.shift);
}
export function matchShortcut(expected, actual) {
    return expected.length === actual.length && expected.every((key, index) => matchKeystroke(key, actual[index] ?? {}));
}
