From 73517807e2f25ced3b5d30b42fd9cfb6561599bc Mon Sep 17 00:00:00 2001 From: crypt Date: Fri, 4 Sep 2026 15:48:14 -0500 Subject: [PATCH] fix(desktop): move Global shortcuts section to bottom and clarify wording The Keyboard Shortcuts page now leads with the in-app sections and places Global last, with its system-wide explanation as a caption under the Global heading. Reword the intro to say "App-wide" instead of "Global" shortcuts, since Global now names a section whose shortcuts do run while typing. --- .../keyboard-shortcuts/KeyboardShortcuts.test.tsx | 8 +++++++- .../keyboard-shortcuts/KeyboardShortcuts.tsx | 14 +++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx index 858411586..df44e8400 100644 --- a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx +++ b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx @@ -82,8 +82,14 @@ describe('KeyboardShortcuts', () => { renderPage(); expect(await screen.findByText('Show or hide the app window')).toBeInTheDocument(); - expect(screen.getByText('Global')).toBeInTheDocument(); expect(screen.getByText('Ctrl+Shift+S')).toBeInTheDocument(); + expect( + screen.getByText( + 'Shortcuts in the Global section work system-wide, even when Sable is not focused.' + ) + ).toBeInTheDocument(); + const headings = screen.getAllByRole('heading', { level: 2 }).map((h) => h.textContent); + expect(headings).toEqual(['General', 'Navigation', 'Messages', 'Global']); }); it('hides the Global section outside the desktop app', () => { diff --git a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx index 72641a358..053273d6e 100644 --- a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx +++ b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx @@ -113,7 +113,7 @@ type KeyboardShortcutsProps = { export function KeyboardShortcuts({ requestBack, requestClose }: KeyboardShortcutsProps) { const isDesktop = isDesktopTauri(); const CATEGORIES = isDesktop - ? (['Global', 'General', 'Navigation', 'Messages'] as const) + ? (['General', 'Navigation', 'Messages', 'Global'] as const) : (['General', 'Navigation', 'Messages'] as const); const [overrides, setOverrides] = useSetting(settingsAtom, 'shortcutOverrides'); const [editingId, setEditingId] = useState(); @@ -226,16 +226,20 @@ export function KeyboardShortcuts({ requestBack, requestClose }: KeyboardShortcu - Choose Change, then press a new key combination. Global shortcuts do not run while - typing unless the action specifically supports it. - {isDesktop && - ' Shortcuts in the Global section work system-wide, even when Sable is not focused.'} + Choose Change, then press a new key combination. App-wide shortcuts do not run + while typing unless the action specifically supports it. {CATEGORIES.map((category) => ( {category} + {category === 'Global' && ( + + Shortcuts in the Global section work system-wide, even when Sable is not + focused. + + )} {SHORTCUTS.filter((shortcut) => shortcut.category === category).map( (shortcut) => (