Add global hotkeys (F13 and Cmd+Shift+M) to toggle recording - #732
Open
jayskee wants to merge 1 commit into
Open
Add global hotkeys (F13 and Cmd+Shift+M) to toggle recording#732jayskee wants to merge 1 commit into
jayskee wants to merge 1 commit into
Conversation
Introduces a Tauri global-shortcut plugin registration for two hotkeys that both toggle the tray's existing toggle_recording action: - F13 - external keyboards (single key, zero conflicts) - Cmd+Shift+M - laptop-friendly fallback (M for Meeting, one-hand) This lets recording start/stop without focusing the app or opening the tray menu, which is important for automations that need to toggle recording in the background (see follow-up meeting auto-detection). Requires macOS Accessibility permission to fire; plugin register() succeeds silently without it but events won't be delivered. Changes: - Cargo.toml: add tauri-plugin-global-shortcut - tauri.conf.json: add global-shortcut permissions - src/tray.rs: make toggle_recording_handler pub so lib.rs can call it - src/lib.rs: register the plugin and bind both shortcuts
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Registers a Tauri global-shortcut plugin so the tray's existing
toggle_recordingaction can be fired from anywhere without focusing the app or opening the tray menu.Two hotkeys are bound, both firing the same handler:
Mfor Meeting, one-hand hit)Why
The tray menu currently requires clicking the menubar icon to reach "Start Recording"/"Stop Recording". This is friction for two use cases:
menu bar 2reportsmissing value), so scripts can't click it directly. A global hotkey exposes a clean automation surface.The same
toggle_recording_handlerthe tray already uses is reused verbatim — no new state or logic paths.Changes
Cargo.toml— addtauri-plugin-global-shortcuttauri.conf.json— addglobal-shortcut:default,global-shortcut:allow-register,global-shortcut:allow-unregistercapabilitiessrc/tray.rs— maketoggle_recording_handlerpubsolib.rscan call it from the plugin handlersrc/lib.rs— register the plugin, bind both shortcuts, wire the handlerTest plan
pnpm run tauri:buildon macOS 26 (Apple Silicon)Global hotkeys: registering F13 and Cmd+Shift+M → toggle recordingNotes
recording_preferencescommand) if the maintainers would like them user-configurable — happy to make either default vs. configurable per your preference.Modifiers::META).