Unverified Commit 743cdd68 authored by Ann Marie Mossman's avatar Ann Marie Mossman Committed by GitHub

Handle KEYCODE_DPAD_CENTER and KEYCODE_ENTER (#140808)

https://github.com/flutter/flutter/issues/1670

Note: This PR replaces the the original PR (https://github.com/flutter/flutter/pull/138240) that got into a state where a rebase was not possible and made it difficult to determine what was causing unrelated test failures.
parent d46a8afc
......@@ -1221,6 +1221,7 @@ class WidgetsApp extends StatefulWidget {
SingleActivator(LogicalKeyboardKey.numpadEnter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.space): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.gameButtonA): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.select): ActivateIntent(),
// Dismissal
SingleActivator(LogicalKeyboardKey.escape): DismissIntent(),
......
......@@ -146,6 +146,11 @@ void main() {
await tester.sendKeyEvent(LogicalKeyboardKey.gameButtonA);
await tester.pumpAndSettle();
expect(checked, isTrue);
checked = false;
await tester.sendKeyEvent(LogicalKeyboardKey.select);
await tester.pumpAndSettle();
expect(checked, isTrue);
// ignore: deprecated_member_use
}, variant: KeySimulatorTransitModeVariant.all());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment