Connect GenRTF to conhost (Win32Interactivity Clipboard) #4981

Closed
opened 2026-01-31 00:02:14 +00:00 by claunia · 4 comments
Owner

Originally created by @DHowett-MSFT on GitHub (Nov 13, 2019).

Originally assigned to: @anirudhrb on GitHub.

Make conhost do RTF!

@DHowett-MSFT @carlos-zamora What needs to be done to bring this into conhost? Are you gonna create a new issue?

Originally posted by @anirudhrb in https://github.com/microsoft/terminal/pull/3535#issuecomment-553435031

Originally created by @DHowett-MSFT on GitHub (Nov 13, 2019). Originally assigned to: @anirudhrb on GitHub. Make conhost do RTF! @DHowett-MSFT @carlos-zamora What needs to be done to bring this into conhost? Are you gonna create a new issue? _Originally posted by @anirudhrb in https://github.com/microsoft/terminal/pull/3535#issuecomment-553435031_
Author
Owner

@anirudhrb commented on GitHub (Nov 14, 2019):

I would like to pick this up too!

I believe this is the file I should be looking at: https://github.com/microsoft/terminal/blob/master/src/interactivity/win32/Clipboard.cpp

At a high-level, I should do the same things that are being done for HTML copy right?

Also, we are registering a format for HTML here:
13406b746b/src/interactivity/win32/Clipboard.cpp (L303)

The way I understand it, any other program that wants to read this HTML needs to know that format name is HTML Format. Similarly, is there some standard name for RTF? Is it simply RTF Format? Do we document these names somewhere?

Let me know if I'm on the right track here.

@anirudhrb commented on GitHub (Nov 14, 2019): I would like to pick this up too! I believe this is the file I should be looking at: https://github.com/microsoft/terminal/blob/master/src/interactivity/win32/Clipboard.cpp At a high-level, I should do the same things that are being done for HTML copy right? Also, we are registering a format for HTML here: https://github.com/microsoft/terminal/blob/13406b746b326f1d15c4aca5f1b61a612afd6bca/src/interactivity/win32/Clipboard.cpp#L303 The way I understand it, any other program that wants to read this HTML needs to know that format name is `HTML Format`. Similarly, is there some standard name for RTF? Is it simply `RTF Format`? Do we document these names somewhere? Let me know if I'm on the right track here.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 14, 2019):

You’re on the right track! I’ll assign this to you.

I’m not sure what the legacy clipboard API contract is for RTF content, but figuring that out is half the fun!

@DHowett-MSFT commented on GitHub (Nov 14, 2019): You’re on the right track! I’ll assign this to you. I’m not sure what the legacy clipboard API contract is for RTF content, but figuring that out is half the fun!
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 14, 2019):

To trigger formatted copy in conhost, you’ll want to hold down Alt when you issue the final right-click that performs the copy. It’s not “on by default” like Terminal’s is.

@DHowett-MSFT commented on GitHub (Nov 14, 2019): To trigger formatted copy in conhost, you’ll want to hold down <kbd>Alt</kbd> when you issue the final right-click that performs the copy. It’s not “on by default” like Terminal’s is.
Author
Owner

@anirudhrb commented on GitHub (Nov 15, 2019):

@DHowett-MSFT raised a PR (#3595) for this. Please review.

@anirudhrb commented on GitHub (Nov 15, 2019): @DHowett-MSFT raised a PR (#3595) for this. Please review.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4981