feat: add many keyboard shortcuts

This commit is contained in:
Zoe
2026-02-26 08:41:22 -06:00
parent d22d08e99f
commit e6bb005f11
5 changed files with 61 additions and 8 deletions
+10 -1
View File
@@ -6,7 +6,8 @@ import type { ModelWithProvider, ProviderWithModels } from '~/composables/useMod
import { sortByReleaseDate } from '~/utils/sort';
const { openDialog } = useDialog();
const { allModels } = await useModels();
const { allModels } = useModels();
const { addShortcut } = useKeyboardShortcuts();
const props = defineProps<{
providers: ProviderWithModels[];
@@ -213,6 +214,14 @@ const handleSearchKeyDown = (event: KeyboardEvent) => {
break;
}
};
const unbindShortcut = addShortcut(['ctrl', 'shift', 'm'], () => {
toggleDropdown();
});
onUnmounted(() => {
unbindShortcut();
})
</script>
<template>