/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
export class KeyBinding {
    constructor(...bindings) {
        this.bindings = bindings.map((binding) => binding.toLowerCase());
    }
    matches(keys) {
        return (this.bindings.length > 0 &&
            this.bindings.every((binding) => this.bindingMatches(keys, binding)));
    }
    bindingMatches(keys, binding) {
        const negated = binding.includes('!');
        const key = binding.replace('!', '');
        return negated ? !keys[key] : keys[key];
    }
}
//# sourceMappingURL=keyBinding.js.map
