fix input

This commit is contained in:
nyne
2024-10-02 16:26:15 +08:00
parent b1e7adb1c5
commit c8d4b3db88
2 changed files with 2 additions and 6 deletions

View File

@@ -40,7 +40,7 @@ class KeyEventListenerState extends State<KeyEventListener> {
focusNode: focusNode,
autofocus: true,
onKeyEvent: (node, event) {
if (event is! KeyUpEvent) return KeyEventResult.handled;
if (event is! KeyUpEvent) return KeyEventResult.ignored;
if (event.logicalKey == LogicalKeyboardKey.escape) {
if (App.rootNavigatorKey.currentState?.canPop() ?? false) {
App.rootNavigatorKey.currentState?.pop();
@@ -52,7 +52,7 @@ class KeyEventListenerState extends State<KeyEventListener> {
for (var handler in _handlers) {
handler(event.logicalKey);
}
return KeyEventResult.handled;
return KeyEventResult.ignored;
},
child: widget.child,
);