refactor(ui): centralize shortcut schema

This commit is contained in:
ChangeHow
2026-08-06 14:18:15 +08:00
parent 4c5421a7af
commit bb25b68657
21 changed files with 610 additions and 994 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
import React from 'react';
import { shortcutRegistry, type ShortcutHandler } from '@/lib/shortcutRegistry';
import type { ShortcutActionId } from '@/lib/shortcuts';
import { shortcutRegistry, type ShortcutActionId, type ShortcutHandler } from '@/lib/shortcuts';
export function useKeybind(actionId: ShortcutActionId, handler: ShortcutHandler): void {
const handlerRef = React.useRef(handler);