Unverified Commit e89747ab authored by Taha Tesser's avatar Taha Tesser Committed by GitHub

fix numpadEnter default shortcut (#87019)

parent 984056c7
......@@ -1152,6 +1152,7 @@ class WidgetsApp extends StatefulWidget {
static const Map<ShortcutActivator, Intent> _defaultShortcuts = <ShortcutActivator, Intent>{
// Activation
SingleActivator(LogicalKeyboardKey.enter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.numpadEnter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.space): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.gameButtonA): ActivateIntent(),
......@@ -1186,6 +1187,7 @@ class WidgetsApp extends StatefulWidget {
),
// On the web, enter activates buttons, but not other controls.
SingleActivator(LogicalKeyboardKey.enter): ButtonActivateIntent(),
SingleActivator(LogicalKeyboardKey.numpadEnter): ButtonActivateIntent(),
// Dismissal
SingleActivator(LogicalKeyboardKey.escape): DismissIntent(),
......@@ -1207,6 +1209,7 @@ class WidgetsApp extends StatefulWidget {
static const Map<ShortcutActivator, Intent> _defaultAppleOsShortcuts = <ShortcutActivator, Intent>{
// Activation
SingleActivator(LogicalKeyboardKey.enter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.numpadEnter): ActivateIntent(),
SingleActivator(LogicalKeyboardKey.space): ActivateIntent(),
// Dismissal
......
......@@ -139,6 +139,11 @@ void main() {
await tester.pumpAndSettle();
expect(checked, isTrue);
checked = false;
await tester.sendKeyEvent(LogicalKeyboardKey.numpadEnter);
await tester.pumpAndSettle();
expect(checked, isTrue);
checked = false;
await tester.sendKeyEvent(LogicalKeyboardKey.gameButtonA);
await tester.pumpAndSettle();
......
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