Menu ▾ ▴

#61 Add global summon hotkey (Cmd/Ctrl+Shift+M)

closed
nobody
None
2026-07-04
2026-07-03
Anonymous
No

Originally created by: kristofferR

What

A system-wide keyboard shortcut — Cmd+Shift+M on macOS, Ctrl+Shift+M on Windows/Linux — that shows and focuses Carrier from anywhere, or hides it when it's already visible and focused (the same toggle a tray click does). Off by default so it can't clash with other apps' shortcuts.

Ref [#52] (part of epic [#59])

How

  • tauri-plugin-global-shortcut v2 added; the shortcut is registered purely from Rust, so no capability changes are needed.
  • New global_hotkey bool in the Settings struct (default false), surfaced as a "Global Hotkey" checkbox under Settings → General.
  • apply_settings calls a new sync_global_hotkey that registers/unregisters CmdOrCtrl+Shift+M to match the setting, so toggling takes effect immediately without a restart. Registration is best-effort (another app may own the combination) and pressing the hotkey reuses the existing toggle_main.
  • The combination is fixed for now — no recorder UI (tracked in [#52]).
  • README feature and shortcut lists updated.

Verified

  • cargo fmt && cargo clippy --all-targets -- -D warnings && cargo test --lib (44 passed) and node --check inject/messenger.js all clean.
  • Confirmed global-hotkey 0.8's parser accepts the CmdOrCtrl modifier (maps to Cmd on macOS, Ctrl elsewhere).

Note

Other feature PRs from this batch touch the same Settings struct / settings.html FIELDS/TABS arrays, so trivial merge conflicts with them are expected.

https://claude.ai/code/session_01Pqw8xaJrGLhgSo2YR68ov5

Summary by CodeRabbit

  • New Features
  • Added an optional global hotkey: Cmd/Ctrl + Shift + M to show or hide the app from anywhere.
  • Added a new settings option to enable or disable the global hotkey.
  • Documentation
  • Updated the README to reflect the new shortcut and settings option.

Related

Tickets: #52
Tickets: #59

Discussion

  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: coderabbitai[bot]

    ✅ Action performed Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
     
  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: coderabbitai[bot]

    Review Change Stack

    [!WARNING]

    Review limit reached

    You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

    Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

    Next review available in: 58 minutes

    Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
    You're only billed for reviews past your plan's rate limits ($0.25/file).


    How can I continue?

    After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

    To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.


    How do review limits work?

    CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

    For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

    Please refer docs for additional details.


    Review details


    ⚙️ Run configuration

    Configuration used: Path: .coderabbit.yaml

    Review profile: ASSERTIVE

    Plan: Pro

    Run ID: 61683a26-0c00-47ef-bb04-03ed3eef58c1


    📥 Commits

    Reviewing files that changed from the base of the PR and between [3e8a4b] and 04586e5a752bc38dea8d8dbe729afae9b65221ae.


    📒 Files selected for processing (1)

    • src-tauri/src/lib.rs
    📝 Walkthrough ## Walkthrough Adds an optional, off-by-default global hotkey (Cmd/Ctrl+Shift+M) to show/hide Carrier from anywhere, using a new `tauri-plugin-global-shortcut` dependency, a `global_hotkey` settings field with registration/sync logic in Rust, a settings UI checkbox, and README documentation. ### Changes **Global Hotkey Feature** |Layer / File(s)|Summary| |---|---| |**Dependency and settings model**
    `src-tauri/Cargo.toml`, `src-tauri/src/lib.rs`|Adds the `tauri-plugin-global-shortcut` dependency and a `global_hotkey: bool` field to `Settings`, defaulting to `false`.| |**Registration and sync logic**
    `src-tauri/src/lib.rs`|Registers the global shortcut plugin at startup and adds `sync_global_hotkey` invoked from `apply_settings` to (un)register `SUMMON_SHORTCUT` and toggle the main window.| |**Settings UI checkbox**
    `dist/settings.html`|Adds a `global_hotkey` field definition with label/hint and includes it in the General tab's field list.| |**Documentation**
    `README.md`|Documents the new global hotkey feature, settings toggle, and keyboard shortcut entry.| **Estimated code review effort:** 2 (Simple) | ~10 minutes ### Sequence Diagram(s) :::mermaid sequenceDiagram participant App participant ApplySettings participant SyncGlobalHotkey participant GlobalShortcutPlugin participant MainWindow App->>GlobalShortcutPlugin: register plugin at startup ApplySettings->>SyncGlobalHotkey: call with global_hotkey setting SyncGlobalHotkey->>GlobalShortcutPlugin: register/unregister SUMMON_SHORTCUT GlobalShortcutPlugin-->>MainWindow: toggle_main on shortcut press **Possibly related issues** - [kristofferR/Carrier#52](https://github.com/kristofferR/Carrier/issues/52): Requests the same system-wide show/hide hotkey with an optional settings toggle via tauri-plugin-global-shortcut, matching this PR's implementation.
    🚥 Pre-merge checks | ✅ 5
    ✅ Passed checks (5 passed) | Check name | Status | Explanation | | :------------------------: | :------- | :--------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title clearly matches the main change: adding a global summon hotkey with Cmd/Ctrl+Shift+M. | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feature/global-summon-hotkey`

    Comment @coderabbitai help to get the list of available commands.

     

    Related

    Commit: [3e8a4b]

  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: coderabbitai[bot]

    ✅ Action performed Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
     
  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: kristofferR

    @coderabbitai review

     
  • Anonymous

    Anonymous - 2026-07-04

    Originally posted by: coderabbitai[bot]

    ✅ Action performed Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
     
  • Anonymous

    Anonymous - 2026-07-04

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.