[PR #16525] Add support for more DSR queries. #30939

Closed
opened 2026-01-31 09:43:56 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/16525

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/16525 **State:** closed **Merged:** Yes --- ## 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
claunia added the pull-request label 2026-01-31 09:43:56 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30939