Add shortcuts and actions for default focus traversal#40186
Merged
gspencergoog merged 5 commits intoflutter:masterfrom Oct 2, 2019
Merged
Add shortcuts and actions for default focus traversal#40186gspencergoog merged 5 commits intoflutter:masterfrom
gspencergoog merged 5 commits intoflutter:masterfrom
Conversation
Contributor
Author
|
This needs tests, so I'm not going to move it out of "draft" until I'm done with those. |
cfb2a40 to
0fa0075
Compare
0a72c31 to
ace31de
Compare
7c9b181 to
682c407
Compare
darrenaustin
approved these changes
Sep 26, 2019
Contributor
There was a problem hiding this comment.
Is this a copy/paste oversight? How is the initial focus happening again?
Contributor
Author
There was a problem hiding this comment.
Yeah, for some reason I CAN'T READ. Removed all of the copies of that, and fixed up the first one (which was the only place that comment belonged).
55f57c2 to
a22fbaf
Compare
a22fbaf to
02411e5
Compare
Closed
1 task
gspencergoog
added a commit
that referenced
this pull request
Oct 10, 2019
This attempts to reland #40186 and #41220, that were reverted in #41945. The main modifications from the original PRs are that I predefine the shortcuts and actions maps instead of defining them inline in the build function, and I use a new mapEquals to do a deep comparison so that we don't rebuild modified things if the contents of the map haven't changed. I also eliminated an operator== and hashCode that were defined on the Actions widget, since widgets shouldn't have those. (it's too bad though: I get an 85% speedup if we leave this in! Too bad it prevents rebuilding of the children...) Fixes #40101
Inconnu08
pushed a commit
to Inconnu08/flutter
that referenced
this pull request
Nov 26, 2019
This adds the default shortcuts and actions for keyboard-based focus traversal of apps. This list of shortcuts includes shortcuts for TAB, SHIFT TAB, RIGHT_ARROW, LEFT_ARROW, UP_ARROW, DOWN_ARROW, and the four DPAD keys for game controllers (because the DPAD produces arrow key events). It doesn't yet include functionality for triggering a control (e.g. SPACE, ENTER, or controller buttons), because that involves restructuring some of the Flutter controls to trigger animations differently, and so will be done in another PR (flutter#41220)
Inconnu08
pushed a commit
to Inconnu08/flutter
that referenced
this pull request
Nov 26, 2019
This attempts to reland flutter#40186 and flutter#41220, that were reverted in flutter#41945. The main modifications from the original PRs are that I predefine the shortcuts and actions maps instead of defining them inline in the build function, and I use a new mapEquals to do a deep comparison so that we don't rebuild modified things if the contents of the map haven't changed. I also eliminated an operator== and hashCode that were defined on the Actions widget, since widgets shouldn't have those. (it's too bad though: I get an 85% speedup if we leave this in! Too bad it prevents rebuilding of the children...) Fixes flutter#40101
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds the default shortcuts and actions for keyboard-based focus traversal of apps.
This list of shortcuts includes shortcuts for TAB, SHIFT TAB, RIGHT_ARROW, LEFT_ARROW, UP_ARROW, DOWN_ARROW, and the four DPAD keys for game controllers (because the DPAD produces arrow key events).
It doesn't yet include functionality for triggering a control (e.g. SPACE, ENTER, or controller buttons), because that involves restructuring some of the Flutter controls to trigger animations differently, and so will be done in another PR (#41220)
Related Issues
Fixes #13264
Fixes #31957
Tests
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?