diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index 308898d..54176de 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -37,6 +37,18 @@ export default function App() { return () => stopPolling(); }, []); + // ⌘K / Ctrl+K 全局搜索 + useEffect(() => { + const handler = (e: KeyboardEvent) => { + if ((e.metaKey || e.ctrlKey) && e.key === 'k') { + e.preventDefault(); + setShowSearch(true); + } + }; + window.addEventListener('keydown', handler); + return () => window.removeEventListener('keydown', handler); + }, []); + const tasks = liveStatus?.tasks || []; const moziTasks = tasks.filter(isEdict); const activeTasks = moziTasks.filter((t) => !isArchived(t));