We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem
When using dioxus_desktop::hooks::use_global_shortcut, the handler is called twice. Once when the key is pressed, and once when it's released.
dioxus_desktop::hooks::use_global_shortcut
This bug probably got introduced when the global-hotkey crate was updated to 0.4.0, as that version's change log mentions adding key state to the event: https://github.com/tauri-apps/global-hotkey/releases/tag/global-hotkey-v0.4.0
The source of the problem lies here:
dioxus/packages/desktop/src/shortcut.rs
Line 68 in fc1f1c2
The id: GlobalHotKeyEvent parameter has a field that says if the shortcut was pressed or not. It is not used in the function or passed onto handlers.
id: GlobalHotKeyEvent
Steps To Reproduce
Steps to reproduce the behavior:
use_global_shortcut
Running the shortcut example project also displays the incorrect behavior.
shortcut
Expected behavior
The event should only be called when pressed, or for a future breaking change the pressed state should be passed to the event handler.
Environment:
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem
When using
dioxus_desktop::hooks::use_global_shortcut
, the handler is called twice. Once when the key is pressed, and once when it's released.This bug probably got introduced when the global-hotkey crate was updated to 0.4.0, as that version's change log mentions adding key state to the event: https://github.com/tauri-apps/global-hotkey/releases/tag/global-hotkey-v0.4.0
The source of the problem lies here:
dioxus/packages/desktop/src/shortcut.rs
Line 68 in fc1f1c2
The
id: GlobalHotKeyEvent
parameter has a field that says if the shortcut was pressed or not. It is not used in the function or passed onto handlers.Steps To Reproduce
Steps to reproduce the behavior:
use_global_shortcut
Running the
shortcut
example project also displays the incorrect behavior.Expected behavior
The event should only be called when pressed, or for a future breaking change the pressed state should be passed to the event handler.
Environment:
The text was updated successfully, but these errors were encountered: