From ba743f79617020493601d52970b48ae87dff23f1 Mon Sep 17 00:00:00 2001 From: PandaDEV <70103896+0PandaDEV@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:39:20 +1000 Subject: [PATCH] feat: custom hotkey with global shortcut --- app.vue | 2 + pages/keybind.vue | 139 ++++--- src-tauri/Cargo.lock | 723 +++++++++++++++++++++++++--------- src-tauri/Cargo.toml | 29 +- src-tauri/src/api/database.rs | 46 ++- src-tauri/src/api/hotkeys.rs | 130 ++++-- src-tauri/tauri.conf.json | 2 +- 7 files changed, 774 insertions(+), 297 deletions(-) diff --git a/app.vue b/app.vue index 72fdf7e..a54b0c0 100644 --- a/app.vue +++ b/app.vue @@ -11,12 +11,14 @@ import { onMounted } from 'vue' onMounted(async () => { await listen('change_keybind', async () => { + console.log("change_keybind"); await navigateTo('/keybind') await app.show(); await window.getCurrentWindow().show(); }) await listen('main_route', async () => { + console.log("main_route"); await navigateTo('/') }) }) diff --git a/pages/keybind.vue b/pages/keybind.vue index 3decf40..a39b70d 100644 --- a/pages/keybind.vue +++ b/pages/keybind.vue @@ -1,32 +1,45 @@