Skip to content

Add Gamepad support for the activation action#49987

Merged
fluttergithubbot merged 5 commits intoflutter:masterfrom
creativecreatorormaybenot:add_game_pad_support
Feb 5, 2020
Merged

Add Gamepad support for the activation action#49987
fluttergithubbot merged 5 commits intoflutter:masterfrom
creativecreatorormaybenot:add_game_pad_support

Conversation

@creativecreatorormaybenot
Copy link
Copy Markdown
Contributor

Description

In native apps, the A button on gamepads will trigger the activation action, e.g. when selecting semantic elements on the screen.

Related Issues

Tests

I added the following tests:

  • Confirming that the default shortcut mapping properly works.

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.

@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 3, 2020
Copy link
Copy Markdown
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@gspencergoog
Copy link
Copy Markdown
Contributor

Your test fails on web because on web, enter doesn't trigger activation (by design). You'll have to check to see if you're running on web in the test using kIsWeb, and only test for enter if it's false.

@creativecreatorormaybenot
Copy link
Copy Markdown
Contributor Author

@gspencergoog Yes, of course. I saw it, but forgot to consider it. Thanks for pointing it out and thanks for the review 👍

Copy link
Copy Markdown
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@fluttergithubbot fluttergithubbot merged commit 7467bde into flutter:master Feb 5, 2020
@creativecreatorormaybenot creativecreatorormaybenot deleted the add_game_pad_support branch February 5, 2020 00:40
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility: Selected buttons cannot be triggered on Game Controller

5 participants