diff --git a/Cargo.lock b/Cargo.lock index cfe81a35..6a12b8d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4960,7 +4960,7 @@ dependencies = [ [[package]] name = "tauri" version = "2.0.0-alpha.8" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "anyhow", "bytes 1.4.0", @@ -5010,7 +5010,7 @@ dependencies = [ [[package]] name = "tauri-build" version = "2.0.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "anyhow", "cargo_toml", @@ -5030,7 +5030,7 @@ dependencies = [ [[package]] name = "tauri-codegen" version = "2.0.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "base64 0.21.0", "brotli", @@ -5055,7 +5055,7 @@ dependencies = [ [[package]] name = "tauri-macros" version = "2.0.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -5449,7 +5449,7 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "0.13.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "gtk", "http", @@ -5469,7 +5469,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" version = "0.13.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "cocoa", "gtk", @@ -5489,7 +5489,7 @@ dependencies = [ [[package]] name = "tauri-utils" version = "2.0.0-alpha.4" -source = "git+https://github.com/tauri-apps/tauri?branch=next#59db76af4c88645ee03b9f87c0f787fbc0040905" +source = "git+https://github.com/tauri-apps/tauri?branch=next#994e4fd6d9e649e0d76124cd6fcd18443ac585b0" dependencies = [ "aes-gcm 0.10.1", "brotli", diff --git a/plugins/window/src/lib.rs b/plugins/window/src/lib.rs index 71b562e8..bead40bf 100644 --- a/plugins/window/src/lib.rs +++ b/plugins/window/src/lib.rs @@ -16,15 +16,8 @@ pub fn init() -> TauriPlugin { init_js.push_str(include_str!("./scripts/drag.js")); #[cfg(any(debug_assertions, feature = "devtools"))] { - let shortcut = if cfg!(target_os = "macos") { - "command+option+i" - } else { - "ctrl+shift+i" - }; init_js.push_str(include_str!("./scripts/hotkey.js")); - init_js.push_str( - &include_str!("./scripts/toggle-devtools.js").replace("__SHORTCUT__", shortcut), - ); + init_js.push_str(include_str!("./scripts/toggle-devtools.js")); } Builder::new("window") diff --git a/plugins/window/src/scripts/toggle-devtools.js b/plugins/window/src/scripts/toggle-devtools.js index ad9b8794..eac5e82a 100644 --- a/plugins/window/src/scripts/toggle-devtools.js +++ b/plugins/window/src/scripts/toggle-devtools.js @@ -1,3 +1,3 @@ -window.hotkeys('__SHORTCUT__', () => { +window.hotkeys(navigator.appVersion.includes('Mac') ? 'command+option+i' : 'ctrl+shift+i', () => { window.__TAURI_INVOKE__('plugin:window|internal_toggle_devtools'); });