Commit 1484c4f
committed
M6: Global hotkey ⌃⌥⌘J
- Add `tauri-plugin-global-shortcut` 2.3.1 (Cargo only — FE registers via the backend) with the matching `global-shortcut:default` capability on the main window.
- New `downloads::global_shortcut`: typed `RegistrationError` (`Conflict`/`InvalidBinding`/`PluginError`) + `RegistrationStatus` state machine on top of a `Registrar` trait so the unit tests use an in-memory fake. The plugin's English error strings get mapped to typed errors at one chokepoint inside the production registrar.
- `set_global_reveal_shortcut(enabled, binding)` IPC so the Settings UI can flip the live registration; backend startup + main-window focus events re-evaluate the FDA gate via `refresh_global_reveal_shortcut`.
- Backend `binding_to_accelerator` adapter mirrors the FE one (`'⌃⌥⌘J'` → `'Control+Alt+Meta+J'`).
- FE bridge in `lib/downloads/global-shortcut-bridge.svelte.ts`: one `global-shortcut-fired` listener, calls `revealLatestDownload`, and on the first un-acknowledged trigger flips `acknowledged = true` BEFORE opening the persistent warn toast (so back-to-back presses don't queue duplicates).
- `GlobalShortcutWarnToastContent.svelte`: "Keep it on" / "Turn it off"; the latter flips `enabled = false` AND calls `setGlobalRevealShortcut(false, binding)` so the OS combo releases immediately.
- Settings registry gains the three `behavior.fileSystemWatching.globalRevealShortcut.{enabled,binding,acknowledged}` entries; `setGlobalRevealBinding` resets `acknowledged` to `false` so each fresh combo gets its own first-trigger warning.
- Stub row in `DriveIndexingSection.svelte` exposing the on/off toggle, the binding text input, and the inline status string (Registered / Couldn't register: in use by another app / Cmdr needs Full Disk Access). M7 will polish + rename the section.
- Both `CLAUDE.md` files (FE + BE) gain a "Global reveal hotkey" subsection.1 parent 32f7573 commit 1484c4f
23 files changed
Lines changed: 1314 additions & 18 deletions
File tree
- apps/desktop
- src-tauri
- capabilities
- src
- downloads
- settings
- src
- lib
- downloads
- ipc
- settings
- sections
- routes/(main)
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
60 | 87 | | |
61 | 88 | | |
62 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
134 | 162 | | |
135 | 163 | | |
136 | 164 | | |
| |||
0 commit comments