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

Add support for the DECID report #8864

Merged
2 commits merged into from
Jan 25, 2021
Merged

Add support for the DECID report #8864

2 commits merged into from
Jan 25, 2021

Conversation

j4james
Copy link
Collaborator

@j4james j4james commented Jan 23, 2021

This PR adds support for the DECID (Identify Device) escape sequence,
which allows for querying the terminal type in a way that is backwards
compatible with VT52 terminals.

This simply checks for the ESC Z sequence in the ActionEscDispatch
method of output state machine, and forwards the query to the existing
DeviceAttributes dispatch method, since the expected response is
identical to a DA report.

Validation Steps Performed

I've added an output engine test that verifies that the ESC Z sequence
is correctly interpreted as a DA query when in ANSI mode, and as a
VT52 identification query when in VT52 mode.

Closes #8857

@ghost ghost added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jan 23, 2021
@@ -226,6 +226,10 @@ bool OutputStateMachineEngine::ActionEscDispatch(const VTID id)
success = _dispatch->HorizontalTabSet();
TermTelemetry::Instance().Log(TermTelemetry::Codes::HTS);
break;
case EscActionCodes::DECID_IdentifyDevice:
success = _dispatch->DeviceAttributes();
TermTelemetry::Instance().Log(TermTelemetry::Codes::DA);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I've reused the DA telemetry code here, since this is essentially an alias for the Device Attributes report, but I'd be happy to create a separate telemetry code for it if that's preferable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh, it's not like that's used for anything anyways 😛

@@ -226,6 +226,10 @@ bool OutputStateMachineEngine::ActionEscDispatch(const VTID id)
success = _dispatch->HorizontalTabSet();
TermTelemetry::Instance().Log(TermTelemetry::Codes::HTS);
break;
case EscActionCodes::DECID_IdentifyDevice:
success = _dispatch->DeviceAttributes();
TermTelemetry::Instance().Log(TermTelemetry::Codes::DA);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh, it's not like that's used for anything anyways 😛

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Jan 25, 2021
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that was pretty straightforward haha

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, as always.

@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 25, 2021
@ghost
Copy link

ghost commented Jan 25, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 172d9a7 into microsoft:main Jan 25, 2021
@ghost
Copy link

ghost commented Jan 28, 2021

🎉Windows Terminal Preview v1.6.10272.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost ghost mentioned this pull request Jan 28, 2021
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
This PR adds support for the `DECID` (Identify Device) escape sequence,
which allows for querying the terminal type in a way that is backwards
compatible with VT52 terminals.

This simply checks for the `ESC Z` sequence in the `ActionEscDispatch`
method of output state machine, and forwards the query to the existing
`DeviceAttributes` dispatch method, since the expected response is
identical to a `DA` report.

## Validation Steps Performed
I've added an output engine test that verifies that the `ESC Z` sequence
is correctly interpreted as a `DA` query when in ANSI mode, and as a
VT52 identification query when in VT52 mode.

Closes microsoft#8857
@j4james j4james deleted the feature-decid branch February 5, 2021 00:22
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Needs-Second It's a PR that needs another sign-off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the DECID report
4 participants