Skip to content
New issue

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

Provide HotkeyState on Global Shortcut Events #3822

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CryZe
Copy link
Contributor

@CryZe CryZe commented Mar 3, 2025

This state is now provided as an argument to the event handler, such that the user can decide whether to react to the global shortcut being released or not.

The global shortcuts are otherwise also triggering when the hotkey is
being released. This affects at least Windows.
@CryZe CryZe requested a review from a team as a code owner March 3, 2025 22:13
@jkelleyrtp
Copy link
Member

I feel like the handlers should still be called and the selection is done in user code. Someone might want to handle released events?

@CryZe
Copy link
Contributor Author

CryZe commented Mar 4, 2025

That would require public API changes, but I can definitely implement it that way.

@CryZe CryZe changed the title Only react to hotkeys that are pressed Provide HotkeyState on Global Shortcut Events Mar 10, 2025
Instead of ignoring the events where the shortcut is released, the state
is now provided as an argument to the event handler.
@CryZe
Copy link
Contributor Author

CryZe commented Mar 14, 2025

This should be ready to be reviewed again. It includes the breaking changes now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants