diff --git a/src/cascadia/TerminalControl/TermControl.cpp b/src/cascadia/TerminalControl/TermControl.cpp index eb5032ef85..9f632d276d 100644 --- a/src/cascadia/TerminalControl/TermControl.cpp +++ b/src/cascadia/TerminalControl/TermControl.cpp @@ -1795,6 +1795,16 @@ namespace winrt::Microsoft::Terminal::Control::implementation return true; } + // While TSF has an active composition, key events must not be forwarded + // to the PTY directly. The IME re-injects navigation/confirmation keys + // after composition ends, at which point HasActiveComposition() == false + // and they are forwarded normally. This mirrors conhost v1 behavior in + // src/interactivity/win32/windowio.cpp. + if (GetTSFHandle().HasActiveComposition()) + { + return true; + } + if (_TrySendKeyEvent(vkey, scanCode, modifiers, keyDown)) { return true;