mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-11-07 02:55:24 +00:00
fix: only run shell keybinding defaults from the shell
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user