-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#46230Labels
a: desktopRunning on desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.15Found to occur in 3.15Found to occur in 3.15has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-macosOwned by the macOS platform teamOwned by the macOS platform team
Description
Sample code:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Listener(
behavior: HitTestBehavior.opaque,
onPointerDown: (e) {
print('RAW: ${RawKeyboard.instance.keysPressed}');
print('HW: ${HardwareKeyboard.instance.logicalKeysPressed}');
},
child: Container(),
),
),
);
}
}To reproduce, focus the flutter window, hold shift key and click on another window to unfocus flutter window. After that, depress the shift key and click anywhere in the Flutter window.
Expected output (keys currently pressed):
flutter: RAW: {}
flutter: HW: {}
Actual output (raw keyboard has shift key stuck):
flutter: RAW: {LogicalKeyboardKey#df100(keyId: "0x200000102", keyLabel: "Shift Left", debugName: "Shift Left")}
flutter: HW: {}
HW keyboard does not have the shift key pressed anymore, but when you shift+click now, the HW keyboard will not register the shift until keyboard event.
The problem here is, as far as I can tell, that only FlutterKeyboardManager only synchronizes modifiers for FlutterEmbedderKeyResponder, not doing anything for FlutterChannelKeyResponder.
Metadata
Metadata
Assignees
Labels
a: desktopRunning on desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.15Found to occur in 3.15Found to occur in 3.15has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-macosOwned by the macOS platform teamOwned by the macOS platform team