Open manuel-minniti opened 9 months ago
@manuel-minniti
Unable to register global shortcut - can you try modifying the shortcut? make it something like Ctrl+Shift+.
and Ctrl+Shift+/
instead and see if it works?
Might want to pull main first as this is way easier now with the settings.json
.
attempted fix: https://github.com/jasonjmcghee/plock/commit/c12e6a15550c8ba8c2286c573593e1f84553cdd8
@manuel-minniti - lmk if fixed!
Thanks for the quick reply, I'll let you know!
Still getting the same error unfortunately.
thread 'main' panicked at src/main.rs:148:18: Failed to register global shortcut: GlobalShortcut(InvalidAccelerator("Unable to register global shortcut"))
Is there a way to get a more verbose error message?
You can run with RUST_BACKTRACE=1
Are you running Wayland?
If so... https://github.com/tauri-apps/global-hotkey/issues/28
RUST_BACKTRACE=1
did not really tell me much.
Yes, I am using Wayland and I have since upgraded NixOS to 24.05 (Uakari).
Alright. I think we'll need to figure out a workaround for Wayland... as tauri doesn't support it yet for global shortcuts and it causes a panic.
Every hotkey library I've found does not support Wayland. Also found this- relatively interesting https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277
Next best thing seems like manually parsing the accelerator and monitoring "pressed_keys" for the shortcut we're looking for
I managed to get a basic environment running on NixOS (nix 2.13.6).
System info
I simply put my nix-shell (see below) into the project directory and ran
nix-shell
.Problem
Running
bun run tauri build
:Running
bun run tauri dev
:Example nix-shell