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

Multiple views with the same HotKey should be supported #3554

Open
tig opened this issue Jun 20, 2024 · 1 comment
Open

Multiple views with the same HotKey should be supported #3554

tig opened this issue Jun 20, 2024 · 1 comment

Comments

@tig
Copy link
Collaborator

tig commented Jun 20, 2024

Today, the way HotKey support works is the first view that added the key binding gets it's Command.Hotkey command invoked and then processing stops. This means if a layout has views with _Test, only the first will get focus when the user presses Alt-T.

It would be nicer if each press of the HotKey cycled between all the views in the visible hierarchy that have bound to that hotkey.

@dodexahedron
Copy link
Collaborator

Agreed.

That's a more natural and typical behavior for things like that.

If they are referenced in a central place, it can be done quite easily.

Since they're delegates, you can just "add" or "subtract" to the delegate (that's also why that works on events - it's exactly the same mechanism.

Doing that then means anything that has subscribed to the delegate will automatically receive the callback, and makes things like cancellation more natural to support, as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants