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 more DSR queries. #16525

Merged

Conversation

j4james
Copy link
Collaborator

@j4james j4james commented Jan 4, 2024

Summary of the Pull Request

This PR adds support for more Device Status Report (DSR) queries,
specifically:

  • Printer Status (DSR ?15)
  • User Defined Keys (DSR ?25)
  • Keyboard Status (DSR ?26)
  • Locator Status (DSR ?55)
  • Locator Identity (DSR ?56)
  • Data Integrity (DSR ?75)
  • Multiple Session Status (DSR ?85)

Detailed Description of the Pull Request / Additional comments

For most of these, we just need to return a DSR sequence indicating
that the functionality isn't supported.

  • DSR ?13 indicates that a printer isn't connected.
  • DSR ?23 indicates the UDK extension isn't supported.
  • DSR ?53 indicates that a locator device isn't connected
  • DSR ?57;0 indicates the locator type is unknown or not connected.
  • DSR ?83 indicates that multiple sessions aren't supported.

For the keyboard, we report DSR ?27;0;0;5, indicating a PC keyboard
(the 5 parameter), a "ready" status (the second 0 parameter), and an
unknown language (the first 0 parameter). In the long term, there may
be some value in identifying the actual keyboard language, but for now
this should be good enough.

The data integrity report was originally used to detect communication
errors between the terminal and host, but that's not really applicable
for modern terminals, so we always just report DSR ?70, indicating
that there are no errors.

Validation Steps Performed

I've added some more adapter tests and output engine tests covering the
new reports.

PR Checklist

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-VT Virtual Terminal sequence support Product-Conhost For issues in the Console codebase labels Jan 4, 2024
@j4james j4james marked this pull request as ready for review January 4, 2024 18:17
@j4james
Copy link
Collaborator Author

j4james commented Jan 4, 2024

I should note that I've also tried to verify these reports in Vttest, but there were some bugs in their DSR handler which have only just been fixed in the latest release, and even now the DSR ?23 report for UDK isn't identified correctly (this is probably my fault - I must have missed that one when I was reporting the other bugs). I didn't want to put this in the PR commit notes since it's likely just a short term issue.

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 24, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 6c192d1 into microsoft:main Jan 24, 2024
15 checks passed
DHowett pushed a commit that referenced this pull request Jan 25, 2024
## Summary of the Pull Request

This PR adds support for more Device Status Report (`DSR`) queries,
specifically:

* Printer Status (`DSR ?15`)
* User Defined Keys (`DSR ?25`)
* Keyboard Status (`DSR ?26`)
* Locator Status (`DSR ?55`)
* Locator Identity (`DSR ?56`)
* Data Integrity (`DSR ?75`)
* Multiple Session Status (`DSR ?85`)

## Detailed Description of the Pull Request / Additional comments

For most of these, we just need to return a `DSR` sequence indicating
that the functionality isn't supported.

* `DSR ?13` indicates that a printer isn't connected.
* `DSR ?23` indicates the UDK extension isn't supported.
* `DSR ?53` indicates that a locator device isn't connected
* `DSR ?57;0` indicates the locator type is unknown or not connected.
* `DSR ?83` indicates that multiple sessions aren't supported.

For the keyboard, we report `DSR ?27;0;0;5`, indicating a PC keyboard
(the `5` parameter), a "ready" status (the second `0` parameter), and an
unknown language (the first `0` parameter). In the long term, there may
be some value in identifying the actual keyboard language, but for now
this should be good enough.

The data integrity report was originally used to detect communication
errors between the terminal and host, but that's not really applicable
for modern terminals, so we always just report `DSR ?70`, indicating
that there are no errors.

## Validation Steps Performed

I've added some more adapter tests and output engine tests covering the
new reports.

## PR Checklist
- [x] Closes #16518
- [x] Tests added/passed

(cherry picked from commit 6c192d1)
Service-Card-Id: 91631713
Service-Version: 1.19
@j4james j4james deleted the feature-more-dsr branch February 10, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase
Projects
Development

Successfully merging this pull request may close these issues.

Add support for more DSR queries
3 participants