copy/paste from host-clipboard by code? #19118

Closed
opened 2026-01-31 06:34:20 +00:00 by claunia · 2 comments
Owner

Originally created by @MrM40 on GitHub (Dec 21, 2022).

I can paste from host-clipboard to the Linux console using SHIFT-INSERT or CTRL+SHIFT+V
I can copy text from the console by select text with the mouse.

But how can I do this by code? I'm running .NET console app in the Linux console.

Originally created by @MrM40 on GitHub (Dec 21, 2022). I can paste from host-clipboard to the Linux console using SHIFT-INSERT or CTRL+SHIFT+V I can copy text from the console by select text with the mouse. But how can I do this by code? I'm running .NET console app in the Linux console.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 06:34:20 +00:00
Author
Owner

@MrM40 commented on GitHub (Dec 21, 2022):

Some of the way, directly the console printf $'\e]52;c;%s\a' "$(base64 <<<'hello world')"
In C# I could call bash -c printf..... but it wouldn't be pretty. I wonder if console.write(something) could do the job?

@MrM40 commented on GitHub (Dec 21, 2022): Some of the way, directly the console ` printf $'\e]52;c;%s\a' "$(base64 <<<'hello world')" ` In C# I could call `bash -c printf.....` but it wouldn't be pretty. I wonder if `console.write(something)` could do the job?
Author
Owner

@MrM40 commented on GitHub (Dec 22, 2022):

It seems OSC 52 has been implemented:
https://github.com/microsoft/terminal/pull/5823
https://github.com/microsoft/terminal/releases/tag/v1.2.2022.0

@MrM40 commented on GitHub (Dec 22, 2022): It seems OSC 52 has been implemented: https://github.com/microsoft/terminal/pull/5823 https://github.com/microsoft/terminal/releases/tag/v1.2.2022.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19118