DioxusLabs / DioxusLabs/dioxus
Control over shortcut manager in desktop apps
- Dominant language
- Rust
- Stars
- 39.1k
- Forks
- 1.9k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
## Feature Request
Desktop apps always create an instance of the shortcut registry, which in turn creates an instance of `global_hotkey::GlobalHotkeyManager`.
https://github.com/DioxusLabs/dioxus/blob/97947b169b48ebc30957ce7e3e1ca9c32ec65389/packages/desktop/src/app.rs#L79
https://github.com/DioxusLabs/dioxus/blob/97947b169b48ebc30957ce7e3e1ca9c32ec65389/packages/desktop/src/shortcut.rs#L59-L65
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.