Add support for more DSR queries #21041

Closed
opened 2026-01-31 07:31:27 +00:00 by claunia · 1 comment
Owner

Originally created by @j4james on GitHub (Jan 2, 2024).

Description of the new feature/enhancement

One of the things we need to do to meet level 2 conformance requirements is to add support for more DSR queries. As a minimum, I think we need these three:

  • User-Defined Key Status: Although UDKs are an optional extension, the standard says that a level 2 device is still required to respond to the DSR query to indicate that it doesn't support the extension if that is the case.
  • Printer Status: Again this is an optional extension, and although it's not specifically mentioned in the standard, it also seems like a good idea to support the DSR query indicating the lack of support (reporting no printer connected).
  • Keyboard Status: This seems to have been left out of the DEC standards manual, but every level 2+ device supports it, and it's not an extension as far as I know, so I think it's something we probably should be reporting.

And while those are the ones that I think are essential, it would also be nice to do some of the other DSR queries at the same time. They're all essentially static responses, so it's not a lot of extra effort.

  • Locator Status and Identify: I'd like to add locator support at some point in the future (this is essentially DEC's mouse protocol), but for now we can respond to these queries with a status indicating that the device is not connected.
  • Data Integrity: Much like the operating status report, we can just respond to this with a hardcoded status indicating that everything is good (which I suspect is what everyone else does).
  • Multiple Session Status: This is an optional extension that we'll likely never support, but again I think it's worth responding to the DSR query to indicate that we don't support it.

Proposed technical implementation details (optional)

My plan was to replace the existing _OperatingStatus method with a generic _DeviceStatusReport method that takes a parameter with the status string. All of the above reports use simple DSR responses of the form \033[{}n, so it'd be overkill to have separate methods for each of them.

Originally created by @j4james on GitHub (Jan 2, 2024). # Description of the new feature/enhancement One of the things we need to do to meet level 2 conformance requirements is to add support for more `DSR` queries. As a minimum, I think we need these three: * **User-Defined Key Status**: Although UDKs are an optional extension, the standard says that a level 2 device is still required to respond to the `DSR` query to indicate that it doesn't support the extension if that is the case. * **Printer Status**: Again this is an optional extension, and although it's not specifically mentioned in the standard, it also seems like a good idea to support the `DSR` query indicating the lack of support (reporting no printer connected). * **Keyboard Status**: This seems to have been left out of the DEC standards manual, but every level 2+ device supports it, and it's not an extension as far as I know, so I think it's something we probably should be reporting. And while those are the ones that I think are essential, it would also be nice to do some of the other `DSR` queries at the same time. They're all essentially static responses, so it's not a lot of extra effort. * **Locator Status and Identify**: I'd like to add locator support at some point in the future (this is essentially DEC's mouse protocol), but for now we can respond to these queries with a status indicating that the device is not connected. * **Data Integrity**: Much like the operating status report, we can just respond to this with a hardcoded status indicating that everything is good (which I suspect is what everyone else does). * **Multiple Session Status**: This is an optional extension that we'll likely never support, but again I think it's worth responding to the `DSR` query to indicate that we don't support it. # Proposed technical implementation details (optional) My plan was to replace the existing [`_OperatingStatus`](https://github.com/microsoft/terminal/blob/63c3573a13cc96bfa3d655f0f1898ae250e2fe35/src/terminal/adapter/adaptDispatch.cpp#L1617) method with a generic `_DeviceStatusReport` method that takes a parameter with the status string. All of the above reports use simple `DSR` responses of the form `\033[{}n`, so it'd be overkill to have separate methods for each of them.
claunia added the Help WantedProduct-ConhostIssue-TaskIn-PRArea-VT labels 2026-01-31 07:31:27 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2024):

we really need a bot rule that's just "Oh j4james filed this? mark as task, VT, conhost, and yank triage" 😄

@zadjii-msft commented on GitHub (Jan 3, 2024): _we really need a bot rule that's just "Oh j4james filed this? mark as task, VT, conhost, and yank triage"_ 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21041