diff --git a/src/terminal/adapter/InteractDispatch.cpp b/src/terminal/adapter/InteractDispatch.cpp index 09329eb664..87e1476d3e 100644 --- a/src/terminal/adapter/InteractDispatch.cpp +++ b/src/terminal/adapter/InteractDispatch.cpp @@ -65,18 +65,8 @@ bool InteractDispatch::WriteCtrlKey(const INPUT_RECORD& event) // - True. bool InteractDispatch::WriteString(const std::wstring_view string) { - if (!string.empty()) - { - const auto codepage = _api.GetConsoleOutputCP(); - InputEventQueue keyEvents; - - for (const auto& wch : string) - { - CharToKeyEvents(wch, codepage, keyEvents); - } - - WriteInput(keyEvents); - } + const auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation(); + gci.GetActiveInputBuffer()->WriteString(string); return true; } diff --git a/src/terminal/parser/InputStateMachineEngine.cpp b/src/terminal/parser/InputStateMachineEngine.cpp index 645ff33a1d..70e8243b6f 100644 --- a/src/terminal/parser/InputStateMachineEngine.cpp +++ b/src/terminal/parser/InputStateMachineEngine.cpp @@ -287,20 +287,6 @@ bool InputStateMachineEngine::ActionPrintString(const std::wstring_view string) // - true iff we successfully dispatched the sequence. bool InputStateMachineEngine::ActionPassThroughString(const std::wstring_view string, const bool /*flush*/) { - if (_pDispatch->IsVtInputEnabled()) - { - // Synthesize string into key events that we'll write to the buffer - // similar to TerminalInput::_SendInputSequence - if (!string.empty()) - { - InputEventQueue inputEvents; - for (const auto& wch : string) - { - inputEvents.push_back(SynthesizeKeyEvent(true, 1, 0, 0, wch, 0)); - } - return _pDispatch->WriteInput(inputEvents); - } - } return ActionPrintString(string); }