Skip to content

Add support for OSC 52 clipboard copies in conhost #18943

@lhecker

Description

@lhecker

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:

// Routine Description:
// - Copies the given content to the clipboard.
// Arguments:
// - content - the text to be copied.
// Return Value:
// - <none>
void ConhostInternalGetSet::CopyToClipboard(const wil::zwstring_view /*content*/)
{
// TODO
}

To do so, we need to extend the Clipboard class to expose this function (in a more convenient way though):

static void _copyToClipboard(UINT format, const void* src, size_t bytes);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-ConhostFor issues in the Console codebase

    Type

    Projects

    Status

    Cherry Picked

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions