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) => (