Description
Feature Request
Desktop apps always create an instance of the shortcut registry, which in turn creates an instance of global_hotkey::GlobalHotkeyManager
.
dioxus/packages/desktop/src/app.rs
Line 79 in 97947b1
dioxus/packages/desktop/src/shortcut.rs
Lines 59 to 65 in 97947b1
These must run on the main thread, and only one of them can exist at a time. Creating another from within your app causes a crash (and even if it didn't, would cause conflicts). I would like to be able to optionally disable the shortcut manager for desktop apps to take control of this entirely myself. At the moment the way to work around this is to run a separate hotkey manager in a separate process, which becomes a bit cumbersome.
The use case for this is an app I'm writing that acts as a modal global hotkey manager. The core of this application is built around managing a global_hotkey
instance to overlay/clear shortcut modes.