Skip to content
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

Re-enable support for DECKPAM #16672

Closed
zadjii-msft opened this issue Feb 6, 2024 · 2 comments · Fixed by #17895
Closed

Re-enable support for DECKPAM #16672

zadjii-msft opened this issue Feb 6, 2024 · 2 comments · Fixed by #17895
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@zadjii-msft
Copy link
Member

This was originally tracked in #16506.
Support was added in #16511.
But turns out people didn't expect the Terminal to actually be like, compliant: #16654

So now we're gonna add a setting to be able to manually enable/disable support for toggling this mode.

The trick here? ConPTY is the thing that's going to need to do the input translation, not the Terminal. So, the Terminal needs a way to tell conpty (at runtime)1 if this is a mode that's allowed or not. And that, we don't have a good system set up for currently.

Footnotes

  1. Leonard keeps terrifyingly calling this ConPTY IOCTL

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Feb 6, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 6, 2024
@zadjii-msft
Copy link
Member Author

A thought: if we made the setting not necessarily hot reload, we could use the --flag as discussed in #15504, #1802 to statically initialize conpty with or without support for DECKPAM

@zadjii-msft zadjii-msft added this to the Backlog milestone Feb 6, 2024
@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 6, 2024
@j4james
Copy link
Collaborator

j4james commented Feb 6, 2024

On the broader issue of passing settings from the conpty terminal down to conhost, I think it's worth considering some of the other places we may want to use it, because the different use cases may influence the way we choose to implement it.

There have been a couple of other cases similar to DECKPAM, where users have wanted to block a particular mode. One common one is cursor blinking (mode ?12), which comes up quite a lot (these are just some examples):

Another less common one is the alternate screen buffer (mode ?1049), usually in relation to the screen multiplexer:

Then there are the situations where conhost needs to report state that it doesn't know about, because that state is initialized (and potentially updated) by the conpty client.:

While the modes would probably be OK if only initialized at startup, for things like the palette and cursor shape I think it's quite important to support real-time updates, because the user will see those changes immediately, and will expect any query APIs to reflect what they're seeing.

And the other thing to consider is how this could work (if at all) when conpty is used as the basis for a telnet/ssh server. There's no opportunity there for the terminal to pass flags on the command line, or over a ioctl-like backchannel (at least as far I know).

One my initial ideas what that this could be handled by querying the connected conpty terminal on startup. That way we could use standard VT sequences, which should just work automatically with most conpty clients. But if we want real-time updates, that's not going to cut it - some mechanism for pushing updates from the terminal side would be required.

But maybe we just have to accept that the telnet/ssh situation will never be perfect.

DHowett pushed a commit that referenced this issue Feb 6, 2024
DECKPAM originally tracked in #16506.
Support was added in #16511.
But turns out people didn't expect the Terminal to actually be like,
compliant: #16654

This closes #16654 while we think over in #16672 how we want to solve
this
DHowett pushed a commit that referenced this issue Feb 21, 2024
DECKPAM originally tracked in #16506.
Support was added in #16511.
But turns out people didn't expect the Terminal to actually be like,
compliant: #16654

This closes #16654 while we think over in #16672 how we want to solve
this

(cherry picked from commit 71efdcb)
Service-Card-Id: 91781164
Service-Version: 1.20
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Sep 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants