Add support for passing DCS sequences over conpty #17625

Closed
opened 2026-01-31 05:48:04 +00:00 by claunia · 1 comment
Owner

Originally created by @j4james on GitHub (Jun 3, 2022).

Description of the new feature/enhancement

We don't currently support passing through DCS sequences over conpty, so they just get ignored. This hasn't been a significant issue up to now, because none of the existing DCS sequences could be meaningfully interpreted by the connected terminal. However, with the recent addition of the DECCTR sequence (for updating the color table), we now have a real use case for DCS passthrough.

Proposed technical implementation details (optional)

My plan was to add a helper function in AdaptDispatch that would create a "passthrough" string handler that DCS operations could choose to return when in conpty mode. This would start by flushing the renderer to make sure there wasn't any pending frame data, and also flushing the state machine to pass through the sequence introducer and parameters that had already been parsed. From then on, it would be the job of the returned string handler to forward the remaining sequence data via the state machine's ActionPassThroughString method.

By default I think we should still be ignoring DCS sequences that we don't understand. But if we know of a sequence that can meaningfully be interpreted by the terminal on the other end of the conpty pipe (like DECCTR), then we can choose to forward that using this passthrough handler.

Originally created by @j4james on GitHub (Jun 3, 2022). # Description of the new feature/enhancement We don't currently support passing through `DCS` sequences over conpty, so they just get ignored. This hasn't been a significant issue up to now, because none of the existing `DCS` sequences could be meaningfully interpreted by the connected terminal. However, with the recent addition of the `DECCTR` sequence (for updating the color table), we now have a real use case for `DCS` passthrough. # Proposed technical implementation details (optional) My plan was to add a helper function in `AdaptDispatch` that would create a "passthrough" string handler that `DCS` operations could choose to return when in conpty mode. This would start by flushing the renderer to make sure there wasn't any pending frame data, and also flushing the state machine to pass through the sequence introducer and parameters that had already been parsed. From then on, it would be the job of the returned string handler to forward the remaining sequence data via the state machine's `ActionPassThroughString` method. By default I think we should still be ignoring `DCS` sequences that we don't understand. But if we know of a sequence that can meaningfully be interpreted by the terminal on the other end of the conpty pipe (like `DECCTR`), then we can choose to forward that using this passthrough handler.
claunia added the Issue-FeatureNeeds-TriageResolution-Fix-CommittedNeeds-Tag-Fix labels 2026-01-31 05:48:05 +00:00
Author
Owner

@ghost commented on GitHub (Jul 6, 2022):

:tada:This issue was addressed in #13227, which has now been successfully released as Windows Terminal Preview v1.15.186.🎉

Handy links:

@ghost commented on GitHub (Jul 6, 2022): :tada:This issue was addressed in #13227, which has now been successfully released as `Windows Terminal Preview v1.15.186`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.15.186) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17625