terminal
terminal copied to clipboard
Indicate support for OSC 52 in the DA1 report
Summary of the Pull Request
Some applications that make use of the OSC 52 clipboard sequence will
only do so if they can be certain that the terminal actually has that
functionality. Indicating our support for OSC 52 in the DA1 report
will give them an easy way to detect that.
References and Relevant Issues
OSC 52 support was added to Windows Terminal in issue #5823, and to
ConHost in issue #18949.
Detailed Description of the Pull Request / Additional comments
Support for writing to the clipboard is indicated in the primary device
attributes report by the extension parameter 52. This is obviously not
a standard DEC extension, but it's one that's been agreed upon by a
number of modern terminals. The extension is only reported when writing
to the clipboard is actually permitted (Windows Terminal has an option
to disable that).
Validation Steps Performed
I've updated the Device Attributes unit test to check that we're
reporting extension 52 when clipboard access is enabled, and not
reporting it when disabled.
PR Checklist
- [x] Closes #19017
- [x] Tests added/passed
Thank you for reaching out to all the other terminals/applications as well! I've read through some of them, and one in particular was quite bemusing. 😄
/azp run
Azure Pipelines successfully started running 1 pipeline(s).