Indicate support for OSC 52 in the DA1 report#19034
Merged
carlos-zamora merged 2 commits intomicrosoft:mainfrom Jun 19, 2025
Merged
Indicate support for OSC 52 in the DA1 report#19034carlos-zamora merged 2 commits intomicrosoft:mainfrom
carlos-zamora merged 2 commits intomicrosoft:mainfrom
Conversation
lhecker
approved these changes
Jun 16, 2025
Member
|
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. 😄 |
carlos-zamora
approved these changes
Jun 18, 2025
Member
carlos-zamora
left a comment
There was a problem hiding this comment.
Thanks for doing this! 😊
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
DHowett
approved these changes
Jun 19, 2025
Member
DHowett
left a comment
There was a problem hiding this comment.
rad, I love the optional features enum
craigbarnes
added a commit
to craigbarnes/dte
that referenced
this pull request
Jun 23, 2025
Indicating support for `OSC 52` like this is quite a recent initiative, but terminal-side support has already been merged in foot, WezTerm, Contour and Windows Terminal. To me, it seems like a much more sensible interface than the existing `XTGETTCAP` and `XTQALLOWED` methods (although dte does already support the former). See also: * contour-terminal/contour#1761 (comment) * https://github.com/contour-terminal/vt-extensions/blob/master/clipboard-extension.md#feature-detection * https://codeberg.org/dnkl/foot/pulls/2130 * https://github.com/wezterm/wezterm/pull/7046/files * microsoft/terminal#19034 * tmux/tmux#4532 * tmux/tmux#4539 Additional context for why I consider `XTGETTCAP` flawed: * https://codeberg.org/dnkl/foot/issues/1701 * ghostty-org/ghostty#1699
DHowett
pushed a commit
that referenced
this pull request
Jun 24, 2025
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. `OSC 52` support was added to Windows Terminal in issue #5823, and to ConHost in issue #18949. 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). 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. - [x] Closes #19017 - [x] Tests added/passed (cherry picked from commit 00ee884) Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgbpe4k Service-Version: 1.22
DHowett
pushed a commit
that referenced
this pull request
Jun 24, 2025
## 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 (cherry picked from commit 00ee884) Service-Card-Id: PVTI_lADOAF3p4s4Axadtzgbpe4g Service-Version: 1.23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Some applications that make use of the
OSC 52clipboard sequence willonly do so if they can be certain that the terminal actually has that
functionality. Indicating our support for
OSC 52in theDA1reportwill give them an easy way to detect that.
References and Relevant Issues
OSC 52support was added to Windows Terminal in issue #5823, and toConHost 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 nota 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
52when clipboard access is enabled, and notreporting it when disabled.
PR Checklist