From a2d52604654798879abc36cc2f813172aabdb05a Mon Sep 17 00:00:00 2001 From: crypt Date: Fri, 4 Sep 2026 18:32:44 -0500 Subject: [PATCH] chore: add changeset and fix formatting --- .changeset/customizable-toggle-window-shortcut.md | 5 +++++ .../keyboard-shortcuts/KeyboardShortcuts.test.tsx | 11 ++++++----- .../settings/keyboard-shortcuts/KeyboardShortcuts.tsx | 10 +++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 .changeset/customizable-toggle-window-shortcut.md diff --git a/.changeset/customizable-toggle-window-shortcut.md b/.changeset/customizable-toggle-window-shortcut.md new file mode 100644 index 000000000..9dbacc875 --- /dev/null +++ b/.changeset/customizable-toggle-window-shortcut.md @@ -0,0 +1,5 @@ +--- +default: minor +--- + +Add a customizable Global shortcut to show or hide the app window diff --git a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx index df44e8400..6f021a834 100644 --- a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx +++ b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.test.tsx @@ -7,13 +7,14 @@ import { defaultSettings, settingsAtom } from '$state/settings'; import type * as PlatformUtils from '$utils/platform'; import { KeyboardShortcuts } from './KeyboardShortcuts'; -const { mockGetDesktopRuntimeState, mockIsDesktopTauri, mockSetToggleWindowShortcut } = - vi.hoisted(() => ({ +const { mockGetDesktopRuntimeState, mockIsDesktopTauri, mockSetToggleWindowShortcut } = vi.hoisted( + () => ({ mockGetDesktopRuntimeState: vi.fn<() => Promise>(), mockIsDesktopTauri: vi.fn<() => boolean>(() => true), - mockSetToggleWindowShortcut: vi - .fn<(params: { binding: string | null }) => Promise>(), - })); + mockSetToggleWindowShortcut: + vi.fn<(params: { binding: string | null }) => Promise>(), + }) +); vi.mock('$generated/tauri/commands', () => ({ getDesktopRuntimeState: mockGetDesktopRuntimeState, diff --git a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx index 053273d6e..3d5f16bba 100644 --- a/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx +++ b/src/app/features/settings/keyboard-shortcuts/KeyboardShortcuts.tsx @@ -17,7 +17,11 @@ import { getShortcutBinding, isDesktopOnlyShortcut, } from '../../../keyboard/shortcuts'; -import type { ShortcutDefinition, ShortcutId, ShortcutOverrides } from '../../../keyboard/shortcuts'; +import type { + ShortcutDefinition, + ShortcutId, + ShortcutOverrides, +} from '../../../keyboard/shortcuts'; function ShortcutKeys({ binding }: { binding: string | null }) { const label = formatShortcut(binding); @@ -226,8 +230,8 @@ export function KeyboardShortcuts({ requestBack, requestClose }: KeyboardShortcu - Choose Change, then press a new key combination. App-wide shortcuts do not run - while typing unless the action specifically supports it. + 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) => (