Add support for OSC 52 clipboard copies in conhost #23286

Open
opened 2026-01-31 08:37:44 +00:00 by claunia · 0 comments
Owner

Originally created by @lhecker on GitHub (May 23, 2025).

Description of the new feature

Windows Terminal supports OSC 52 and so conhost should too.

Proposed technical implementation details

This is super easy to do and only requires us to fill out this function:
2d64a3a4ab/src/host/outputStream.cpp (L277-L286)

To do so, we need to extend the Clipboard class to expose this function (in a more convenient way though):
2d64a3a4ab/src/interactivity/win32/clipboard.hpp (L38)

(Note that you need to set Host.EXE as your startup project.)

Originally created by @lhecker on GitHub (May 23, 2025). ### Description of the new feature Windows Terminal supports OSC 52 and so conhost should too. ### Proposed technical implementation details This is super easy to do and only requires us to fill out this function: https://github.com/microsoft/terminal/blob/2d64a3a4ab0d0d1c5b9085a022f5319460ef68d7/src/host/outputStream.cpp#L277-L286 To do so, we need to extend the `Clipboard` class to expose this function (in a more convenient way though): https://github.com/microsoft/terminal/blob/2d64a3a4ab0d0d1c5b9085a022f5319460ef68d7/src/interactivity/win32/clipboard.hpp#L38 (Note that you need to set `Host.EXE` as your startup project.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23286