Skip to content

Support copying to system clipboard via OSC52 escape sequence #4943

@Gorfeywog

Description

@Gorfeywog

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

It's really useful to be able to copy highlighted text to the system clipboard using ctrl+c (CopyOrCancelLine). This works without a hitch using the shell locally, and when using PowerShell remoting to connect to another computer, but not in certain other circumstances - say, if I remoted into another system using ssh and ran PowerShell there, ctrl+c doesn't copy to my system clipboard, which is really unfortunate.
Some of the situations it doesn't handle could be solved by adding either an option or another key handler that copies the selection using the OSC52 escape sequence.

Proposed technical implementation details (optional)

I would be satisfied with either an option to change Copy and equivalents to copy using OSC52 escape sequences or alternative keyhandlers that function like Copy etc. but use OSC52 copying. Set-Clipboard supports this; its implementation might be a useful reference?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementIt's a feature request.Needs-Triage 🔍It's a new issue that core contributor team needs to triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions