[PR #19034] Indicate support for OSC 52 in the DA1 report #31684

Open
opened 2026-01-31 09:48:50 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19034

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19034 **State:** closed **Merged:** Yes --- ## 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
claunia added the pull-request label 2026-01-31 09:48:50 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31684