fix: only run shell keybinding defaults from the shell

This commit is contained in:
LukeGus committed 2026-11-06 20:49:47 -06:00
1 parent 4584aff32b
commit e033025657
1 file changed
+5 -1
@@ -20,6 +20,7 @@ import {
GLOBAL_KEYBINDING_EVENT,
getKeybindingAction,
listKeybindingDefaults,
SHELL_KEYBINDING_ACTION_IDS,
runKeybindingAction,
} from "@/shell/keybinding-registry";
import { globalShortcutHandler } from "@/lib/global-shortcut-handler";
@@ -121,11 +122,14 @@ export function useShellKeybindings({
return;
}
// Plugins run their own defaults, so only the shell's are handled here.
const defaultBinding = listKeybindingDefaults().find(
(entry) =>
SHELL_KEYBINDING_ACTION_IDS.includes(entry.id) &&
!customBindings.some(
(custom) => custom.overridesDefaultId === entry.id,
) && eventMatchesCombo(event, entry.combo),
) &&
eventMatchesCombo(event, entry.combo),
);
if (!defaultBinding || !getKeybindingAction(defaultBinding.id)) return;
event.preventDefault();