Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

fix(hotkey): add macOS permission warning for global shortcut registration failure

Tonhoc08b4065b1d7
diff --git a/src-tauri/src/hotkey.rs b/src-tauri/src/hotkey.rs
index 852d7898..621ae708 100644
--- a/src-tauri/src/hotkey.rs
+++ b/src-tauri/src/hotkey.rs
@@ -25,6 +25,22 @@ pub fn register_from_settings(app: &tauri::AppHandle) {
Ok(shortcut) => {
if let Err(e) = app.global_shortcut().register(shortcut) {
tracing::warn!("Failed to register hotkey '{}': {}", binding, e);
+ #[cfg(target_os = "macos")]
+ {
+ tracing::warn!(
+ "[hotkey] macOS: Global shortcut registration failed. \
+ The app may need Accessibility permission. \
+ Go to System Settings > Privacy & Security > Accessibility \
+ and enable OmniGet."
+ );
+ let _ = app.emit(
+ "hotkey-permission-error",
+ serde_json::json!({
+ "message": "Global hotkey requires Accessibility permission. Open System Settings > Privacy & Security > Accessibility and enable OmniGet.",
+ "platform": "macos"
+ }),
+ );
+ }
} else {
tracing::info!("[hotkey] registered: {}", binding);
}