diff --git a/src/renderer/src/components/header/header.tsx b/src/renderer/src/components/header/header.tsx index 9624e8b7..0dce9e8b 100644 --- a/src/renderer/src/components/header/header.tsx +++ b/src/renderer/src/components/header/header.tsx @@ -65,6 +65,19 @@ export function Header({ onSearch, onClear, search }: HeaderProps) { navigate(-1); }; + useEffect(() => { + window.onkeydown = (event: KeyboardEvent) => { + const { key, ctrlKey } = event; + if (!isFocused && ctrlKey && key === "k") { + focusInput(); + } + }; + + return () => { + window.onkeydown = null; + }; + }, [isFocused]); + return ( <>