Add support for Presentation State reports #19528

Open
opened 2026-01-31 06:46:13 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Mar 12, 2023).

Description of the new feature/enhancement

There are two reports that can be queried with the DECRQPSR (request presentation state) escape sequence. The one returns the active tab stops, and the other returns what they call "cursor information", which includes things like cursor position, SGR attributes, and character set designations.

There is also then a corresponding DECRSPS sequence (restore presentation state) which can restore the saved information from the above mentioned reports.

There are a number of uses for these sequences, but the main reason I want to support them is because they're needed to meet the requirements of the TSI (terminal state interrogation) feature, which is itself a requirement for level 3 compliance.

Proposed technical implementation details (optional)

This will require some additional work in the TerminalOuput class to track the actual IDs of the designated character sets so we can return that information in the report. I think most of the other information we need should be easy to access.

Originally created by @j4james on GitHub (Mar 12, 2023). # Description of the new feature/enhancement There are two reports that can be queried with the [`DECRQPSR`](https://www.vt100.net/docs/vt510-rm/DECRQPSR.html) (request presentation state) escape sequence. The one returns the active tab stops, and the other returns what they call "cursor information", which includes things like cursor position, SGR attributes, and character set designations. There is also then a corresponding [`DECRSPS`](https://www.vt100.net/docs/vt510-rm/DECRSPS.html) sequence (restore presentation state) which can restore the saved information from the above mentioned reports. There are a number of uses for these sequences, but the main reason I want to support them is because they're needed to meet the requirements of the TSI (terminal state interrogation) feature, which is itself a requirement for level 3 compliance. # Proposed technical implementation details (optional) This will require some additional work in the `TerminalOuput` class to track the actual IDs of the designated character sets so we can return that information in the report. I think most of the other information we need should be easy to access.
claunia added the Help WantedIssue-TaskIn-PRArea-VTNeeds-Tag-Fix labels 2026-01-31 06:46:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19528