X Tutup
Skip to content

Consider indicating support for OSC 52 in your DA1 report #1324

@j4james

Description

@j4james

FYI, a number of terminals have recently agreed to indicate support for OSC 52 by including the extension number 52 in their DA report. And there are already a few applications (neovim, tmux, dte) that have started using that report to determine whether it's safe for them to enable clipboard functionality by default.

You can read the spec for the extension here:
https://github.com/contour-terminal/vt-extensions/blob/master/clipboard-extension.md

But all that is required of a terminal is the ability to write to the clipboard with OSC 52 using a Pc value of c, or an empty Pc value. All other aspects of the OSC 52 protocol are optional. And I think mintty already meets those requirements.

The only catch I can see is that mintty lets you pick a terminal type, and then alters the DA1 response to somewhat emulate the report of that particular terminal. And if you're trying to pretend to be something like a VT525, then it probably doesn't make sense to include a non-standard extension in the report. But maybe you could still have the default DA1 response reflect the actual capabilities of the terminal, and potentially then include this extension in your report.

It's not important if you don't think it's worth the effort though. I just wanted to make you aware of the extension in case you found it useful.

One other point I should mention - you should only report the extension if clipboard write access is actually permitted. For mintty I think that means you must have AllowSetSelection=true in your config (paste support is not required though).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup