-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Conversation
@@ -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); |
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.
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.
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.
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); |
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.
meh, it's not like that's used for anything anyways 😛
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.
Wow, that was pretty straightforward haha
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.
Excellent, as always.
Hello @DHowett! Because this pull request has the 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 (
|
🎉 Handy links: |
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
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 theActionEscDispatch
method of output state machine, and forwards the query to the existing
DeviceAttributes
dispatch method, since the expected response isidentical to a
DA
report.Validation Steps Performed
I've added an output engine test that verifies that the
ESC Z
sequenceis correctly interpreted as a
DA
query when in ANSI mode, and as aVT52 identification query when in VT52 mode.
Closes #8857