-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Update the Device Attributes report #14491
Comments
Seems sensible to me, though, we might want to be careful to be sure that the client can reply. Maybe we should gate it on Maybe we could just not block startup on this. Fire off the |
Yeah,
That kind of sucks, because if that really is necessary, we're again left with a solution that isn't going to work some of the time. And any apps that rely on the I'd love to know under what conditions this is expected to fail, and whether that's fixable. Like could we maybe delay sending the |
This is an update of our Primary Device Attributes report, which better indicates the feature extensions that we now support. ## Detailed Description of the Pull Request / Additional comments This first parameter of the response is 61, representing a conformance level of 1. The subsequent parameters identify the supported feature extensions. 1 = 132 column mode 6 = Selective erase 7 = Soft fonts 22 = Color text 23 = Greek character sets 24 = Turkish character sets 28 = Rectangular area operations 32 = Text macros 42 = ISO Latin-2 character set Most of these features are handled entirely within `AdaptDispatch`, so they apply to all clients. However, 132 column mode is only supported by ConHost, so we don't report that for conpty clients. And note that soft fonts won't necessarily work in all conpty clients, but we don't have an easy way of determining that, so we just report soft font support for everyone. ## Validation Steps Performed I've manually verified that the `DA1` report is returning the expected response in Vttest, both from ConHost and Windows Terminal. I've also updated the `DeviceAttributesTests` in the adapter tests to account for the new expected response. Closes #14491
Description of the new feature/enhancement
Up to now, we've been identifying as a VT100, since we haven't fully met the conformance requirements for any of the higher level devices. But with the recent support that's been added for several VT extensions, I think it's time to consider an updated
DA
response.The structure of a
DA
report is as follows: the first parameter value indicates the conformance level with a number in the range 61 to 69 (representing levels 1 to 9); subsequent parameters indicate the supported feature extensions. The early VT terminals didn't follow this standard, but their initialDA
parameter would have always been below 60.We still don't meet the requirements for level 2, so the first parameter in our
DA
response will have to be 61. But we do now support a number of feature extensions, which we can indicate with additional parameter values. Some of the more useful ones include:7 = Soft Fonts (since PR #13965)
28 = Rectangular Editing (since PR #14285)
32 = Text Macros (since PR #14402, if accepted)
Applications that wish to take advantage of these features would be able to do so automatically if they could tell from the
DA
report that the terminal supported the necessary extensions.Proposed technical implementation details (optional)
Updating the
DA
report seems like it ought to be a trivial change. However, the complication for us is this it's handled on the conhost side, but it needs to take into account the capabilities of the conpty client. For example, conhost supports Soft Fonts, but they won't work over conpty unless the conpty client also supports them (and for Terminal that's dependent on the configured renderer).My proposed solution for this is that we fire off a
DA
request to the conpty client on startup (similar to the way we sometimes send aCPR
request on startup). We then save the relevant information from the client's response (for now just the Soft Font support), and use that to determine what features we can include in ourDA
response.Does that seem like a reasonable approach to take?
The text was updated successfully, but these errors were encountered: