From a7fa99a3495c727b62d616eddd08832a01949ce1 Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 8 Oct 2026 02:25:03 -0700 Subject: [PATCH] fix(web): preserve modifiers across Legacy-to-Map shortcuts Signed-off-by: fufesou --- flutter/lib/models/input_model.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flutter/lib/models/input_model.dart b/flutter/lib/models/input_model.dart index a5a9d9551..96d4009ff 100644 --- a/flutter/lib/models/input_model.dart +++ b/flutter/lib/models/input_model.dart @@ -1066,8 +1066,11 @@ class InputModel { LogicalKeyboardKey.metaRight: PhysicalKeyboardKey.metaRight, }.entries) { if (!pressed.contains(entry.key)) continue; - if (isWebDesktop && keyboardMode == kKeyMapMode) { + if (isWebDesktop) { + // The action can switch from Legacy to Map while modifiers stay held. _localFlutterShortcuts.recordReleasedModifiers([entry.value]); + } + if (isWebDesktop && keyboardMode == kKeyMapMode) { releases.add(bind.sessionHandleFlutterKeyEvent( sessionId: sessionId, character: '',