Repository navigation
Add support for Presentation State reports #14984
Description
Activity
- addedIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Complex enough to require an in depth planning process and actual budgeted, scheduled work.
on Mar 12, 2023 - addedNeeds-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meeting
on Mar 12, 2023 j4james commented
on Mar 12, 2023 CollaboratorAuthorMore actionsTony Lawrence (@al20878) I've got another couple of tests which I'd previously created for these reports. They were written as bash scripts, though, so just let me know if that's a problem and I can rewrite them in Python.
Also, note that they don't actually log anything, the results are displayed on the screen, so I'd be grateful if you could take a photograph of each run and post that here.
This is for the tab stop report:
https://gist.github.com/j4james/a25e6290772353c06f85c584007c2aa0And this one is for the cursor information report:
https://gist.github.com/j4james/570a9b7dd28dbdd8b626be2770567210j4james commented
on Mar 12, 2023 CollaboratorAuthorMore actionsI forgot to say, I'd ideally like to see this run on a VT525 - specifically the cursor information report - because I think it might include additional information for the active SGR colors that other terminals wouldn't include.
Shell scripts are fine, I'll be running them on Linux (Raspbian), so it's all good, I hope. Downloaded both, will post the results.
Reacted by James HoldernessUnfortunately, I'm having issues with these two... The first one (
dectabsr.sh) makes the terminal reset and then appears like it also generates some garbage on the screen. Attaching the final pic, but I also shot a video of how it's run.The other one, too, appears to behave erratically but not as bad. The final screenshot is here (and, there's a video as well, I'll post the links to both in a few):
j4james commented
on Mar 12, 2023 CollaboratorAuthorMore actionsTony Lawrence (@al20878) Thanks again. This is very useful. The cursor information report (the second one) is perfect. I think the weirdness you're seeing is just the test doing it's thing. It's moving the cursor to different positions on the screen, changing the active page, and setting margins, etc. and all the while it's requesting reports from the terminal which take a couple seconds. The final result is exactly what I was expecting to see. I had hoped there might also be color information, but that wasn't the case.
I think the problem with the first one is that I'm switching back and forth between 80 columns and 132 columns, and I suspect I need to give the terminal time to make that switch before throwing queries at it. If it's not ready to respond fast enough, the report reader probably times out, and the report then ends up written on to the screen.
I'll try and make some adjustments to the script to see if I can fix the issue and let you know when I have another version ready to test.
j4james commented
on Mar 12, 2023 CollaboratorAuthorMore actionsTony Lawrence (@al20878) I've uploaded a revision of the
dectabsrscript with a one second delay after each column mode change, and a longer timeout on the report reader. Hopefully that should work better. When you have a chance, I'd appreciate you trying it again.https://gist.github.com/j4james/a25e6290772353c06f85c584007c2aa0
j4james commented
on Mar 13, 2023 CollaboratorAuthorMore actionsTony Lawrence (@al20878) Perfect. That tells me everything I needed to know. Thank you so much for doing all this testing. This is going to keep me busy for a while, so I'll leave you in peace for a bit. 😉
No problem, James Holderness (@j4james)! I was happy to help :-)
Please feel free to reach out if you need any further testing. And good luck!Reacted by James Holderness- addedHelp WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.Area-VTVirtual Terminal sequence supportVirtual Terminal sequence supportIssue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.and removedIssue-FeatureComplex enough to require an in depth planning process and actual budgeted, scheduled work.Complex enough to require an in depth planning process and actual budgeted, scheduled work.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meetingIt's a new issue that the core contributor team needs to triage at the next triage meeting
on Mar 13, 2023 - addedIn-PRThis issue has a related PRThis issue has a related PR
on Mar 16, 2023 - added a commit that references this issue
on Mar 23, 2023 - added a commit that references this issue
on Jan 24, 2024 - added a commit that references this issue
on Jan 25, 2024
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
DECRSPSsequence (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
TerminalOuputclass 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.