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

[menubar] Support keyboard shortcuts #95

Open
stuartmorgan opened this issue Jul 10, 2018 · 13 comments
Open

[menubar] Support keyboard shortcuts #95

stuartmorgan opened this issue Jul 10, 2018 · 13 comments

Comments

@stuartmorgan
Copy link
Collaborator

The current menu support doesn't allow for keyboard shortcuts, which is definitely necessary.

(It might also be useful to have some kind of generic way for widgets to handle keyboard shortcuts, but that would need more thought about how focus works in a desktop Flutter environment.)

@rodydavis

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

@rodydavis

This comment has been minimized.

@stuartmorgan stuartmorgan changed the title Support keyboard shortcuts Support menubar keyboard shortcuts Apr 8, 2019
stuartmorgan added a commit to stuartmorgan/flutter-desktop-embedding that referenced this issue Jun 5, 2019
Adds the ability to set shortcuts for menu items, using the same format
on the Dart side that will be used for Action shorcuts. Currently only
the macOS platform implementation uses them.

There are some limitations around non-ascii keys, which will be resolved
via a full generated keymap once this is folded into Flutter, but common
cases are special-cased, and more special-casing can be added as needed
by clients.

Adds various shortcuts to the testbed app, exercising various modifiers
and special cases.

Partially addresses google#95
stuartmorgan added a commit that referenced this issue Jun 6, 2019
Adds the ability to set shortcuts for menu items, using the same format
on the Dart side that will be used for Action shorcuts. Currently only
the macOS platform implementation uses them.

There are some limitations around non-ascii keys, which will be resolved
via a full generated keymap once this is folded into Flutter, but common
cases are special-cased, and more special-casing can be added as needed
by clients.

Adds various shortcuts to the testbed app, exercising various modifiers
and special cases.

Partially addresses #95
@rodydavis

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

@rodydavis

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

@rodydavis

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

@GroovinChip

This comment has been minimized.

@stuartmorgan

This comment has been minimized.

@GroovinChip

This comment has been minimized.

@stuartmorgan stuartmorgan changed the title Support menubar keyboard shortcuts [menubar] Support keyboard shortcuts Apr 15, 2020
@RobertOdrowaz
Copy link

Workaround: https://github.com/RobertOdrowaz/flutter-desktop-embedding/tree/feature/short-cut-labels

It implements only displaying of the shortcut labels the actual events still need to be handled in flutter e.g. using the Shortcuts widget.

I don't have enough expertise in GTK and win32 programming to resolve this issue completely. I believe the Linux implementation would work correctly if flutter didn't have precedence in event handling and consume the key events first. The windows implementation doesn't include event handling at all.

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

No branches or pull requests

4 participants