mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(web): add keyboard shortcuts for tool navigation
Register global keyboard shortcuts: Cmd/Ctrl+K to focus search, Cmd/Ctrl+/ for tools view, Cmd/Ctrl+Shift+D to toggle theme, Cmd/Ctrl+Alt+1-8 for quick tool navigation. Uses platform-aware mod key detection (Cmd on Mac, Ctrl on Windows/Linux).
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { useKeyboardShortcuts } from "@/hooks/use-keyboard-shortcuts";
|
||||
|
||||
/**
|
||||
* Wrapper that registers global keyboard shortcuts.
|
||||
* Must be rendered inside a <BrowserRouter> so that
|
||||
* useNavigate() works inside the hook.
|
||||
*/
|
||||
export function KeyboardShortcutProvider({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
useKeyboardShortcuts();
|
||||
return <>{children}</>;
|
||||
}
|
||||
Reference in New Issue
Block a user