From 97825dd54f61cb6c5250fb51e90ab7c9b0df9e3f Mon Sep 17 00:00:00 2001 From: Wendell Adriel Date: Wed, 21 Oct 2026 20:02:07 +0100 Subject: [PATCH 1/2] feat: add g n shortcut for notifications --- resources/js/components/keyboard-shortcuts-dialog.tsx | 1 + resources/js/hooks/use-keyboard-shortcuts.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/js/components/keyboard-shortcuts-dialog.tsx b/resources/js/components/keyboard-shortcuts-dialog.tsx index 25332e2667..ce744f150f 100644 --- a/resources/js/components/keyboard-shortcuts-dialog.tsx +++ b/resources/js/components/keyboard-shortcuts-dialog.tsx @@ -24,6 +24,7 @@ const shortcuts = (keys: KeyLabels): Shortcut[] => [ { keys: [keys.mod, keys.shift, 'P'], label: 'Preview (in the composer)' }, { keys: ['g', 'l'], label: 'Go to your log' }, { keys: ['g', 'e'], label: 'Go to trending' }, + { keys: ['g', 'n'], label: 'Go to notifications' }, { keys: ['g', 'p'], label: 'Go to your profile' }, { keys: ['g', 's'], label: 'Go to settings' }, { keys: ['?'], label: 'Show this list' }, diff --git a/resources/js/hooks/use-keyboard-shortcuts.ts b/resources/js/hooks/use-keyboard-shortcuts.ts index 0c5bb1c537..2fa8248205 100644 --- a/resources/js/hooks/use-keyboard-shortcuts.ts +++ b/resources/js/hooks/use-keyboard-shortcuts.ts @@ -1,6 +1,7 @@ import { router } from '@inertiajs/react'; import { useEffect } from 'react'; import LogController from '@/actions/App/Http/Controllers/LogController'; +import NotificationController from '@/actions/App/Http/Controllers/NotificationController'; import { signIn } from '@/lib/auth'; import { hasModKey } from '@/lib/keyboard'; import { show } from '@/routes/user'; @@ -72,7 +73,7 @@ function openFocusedCommit(): boolean { } /** - * Guests have no log, profile, or settings to go to, so those shortcuts take them to sign in. + * Guests have no log, notifications, profile, or settings to go to, so those shortcuts take them to sign in. */ export function useKeyboardShortcuts( user: User | null, @@ -87,10 +88,11 @@ export function useKeyboardShortcuts( const goTo: Record void> = user === null || log === null - ? { l: signIn, e: signIn, p: signIn, s: signIn } + ? { l: signIn, e: signIn, n: signIn, p: signIn, s: signIn } : { l: () => router.visit(LogController.show(log)), e: () => router.visit(LogController.show('trending')), + n: () => router.visit(NotificationController.index()), p: () => router.visit(show(user)), s: () => router.visit(edit()), }; From 16f36469664579b353cfa6534711ad68a03b4a67 Mon Sep 17 00:00:00 2001 From: Wendell Adriel Date: Wed, 21 Oct 2026 20:02:13 +0100 Subject: [PATCH 2/2] docs: document notifications keyboard shortcut --- KNOWLEDGE_BASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KNOWLEDGE_BASE.md b/KNOWLEDGE_BASE.md index d2a594b406..3f6467c264 100644 --- a/KNOWLEDGE_BASE.md +++ b/KNOWLEDGE_BASE.md @@ -399,7 +399,7 @@ Press **?** to open the shortcut reference. Navigation shortcuts work outside te | `⌘/Ctrl+K` or `/` | Search developers and commits. | | `⌘/Ctrl+Enter` | Submit from the composer. | | `⌘/Ctrl+Shift+P` | Toggle composer preview. | -| `g` then `l` / `e` / `p` / `s` | Go to your log / Trending / profile / settings. | +| `g` then `l` / `e` / `n` / `p` / `s` | Go to your log / Trending / notifications / profile / settings. | Source: [shortcut reference](resources/js/components/keyboard-shortcuts-dialog.tsx).