Skip to content

Commit

Permalink
Fix override of default key bindings
Browse files Browse the repository at this point in the history
fixed #14667
  • Loading branch information
JonasHelming committed Dec 23, 2024
1 parent ea87531 commit 2655967
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/browser/keybinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,15 +622,15 @@ export class KeybindingRegistry {
matchKeybinding(keySequence: KeySequence, event?: KeyboardEvent): KeybindingRegistry.Match {
let disabled: Set<string> | undefined;
const isEnabled = (binding: ScopedKeybinding) => {
if (event && !this.isEnabled(binding, event)) {
return false;
}
const { command, context, when, keybinding } = binding;
if (!this.isUsable(binding)) {
disabled = disabled || new Set<string>();
disabled.add(JSON.stringify({ command: command.substring(1), context, when, keybinding }));
return false;
}
if (event && !this.isEnabled(binding, event)) {
return false;
}
return !disabled?.has(JSON.stringify({ command, context, when, keybinding }));
};

Expand Down

0 comments on commit 2655967

Please sign in to comment.