-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Indicate support for OSC 52 in the DA1 report #19034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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. 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! 😊
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rad, I love the optional features enum
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
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
## 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
Summary of the Pull Request
Some applications that make use of the
OSC 52
clipboard sequence willonly do so if they can be certain that the terminal actually has that
functionality. Indicating our support for
OSC 52
in theDA1
reportwill give them an easy way to detect that.
References and Relevant Issues
OSC 52
support 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
52
when clipboard access is enabled, and notreporting it when disabled.
PR Checklist