Terminal does not respond to DSR 5 VT Sequence #7050

Closed
opened 2026-01-31 00:53:47 +00:00 by claunia · 4 comments
Owner

Originally created by @wthueb on GitHub (Mar 20, 2020).

Environment

Windows build number: 10.0.18363.720
Windows Terminal version (if applicable): 0.10.761.0

Any other software? Ubuntu for Windows Subsystem for Linux.

Steps to reproduce

Run the following script (it was created for iTerm2 in order to check if the terminal is iTerm2 regardless of ssh connections or anything) in Ubuntu: https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2check

Expected behavior

The terminal responding with its status to the ESC[5n sequence.

Actual behavior

stdin gets blocked since the terminal doesn't respond to the ESC[5n sequence. I have only ran into it with this one script, however I'm sure there are other scripts out there using this.

Originally created by @wthueb on GitHub (Mar 20, 2020). # Environment ```none Windows build number: 10.0.18363.720 Windows Terminal version (if applicable): 0.10.761.0 Any other software? Ubuntu for Windows Subsystem for Linux. ``` # Steps to reproduce Run the following script (it was created for iTerm2 in order to check if the terminal is iTerm2 regardless of ssh connections or anything) in Ubuntu: https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2check # Expected behavior The terminal responding with its status to the ESC[5n sequence. # Actual behavior stdin gets blocked since the terminal doesn't respond to the ESC[5n sequence. I have only ran into it with this one script, however I'm sure there are other scripts out there using this.
Author
Owner

@zadjii-msft commented on GitHub (Mar 20, 2020):

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI--ordered-by-the-final-character_s

CSI Ps n  Device Status Report (DSR).
            Ps = 5  ⇒  Status Report.
          Result ("OK") is CSI 0 n
            Ps = 6  ⇒  Report Cursor Position (CPR) [row;column].
          Result is CSI r ; c R

          Note: it is possible for this sequence to be sent by a func-
          tion key.  For example, with the default keyboard configura-
          tion the shifted F1 key may send (with shift-, control-, alt-
          modifiers)

            CSI 1 ; 2  R , or
            CSI 1 ; 5  R , or
            CSI 1 ; 6  R , etc.

          The second parameter encodes the modifiers; values range from
          2 to 16.  See the section PC-Style Function Keys for the
          codes.  The modifyFunctionKeys and modifyKeyboard resources
          can change the form of the string sent from the modified F1
          key.
@zadjii-msft commented on GitHub (Mar 20, 2020): https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Functions-using-CSI-_-ordered-by-the-final-character_s_ ``` CSI Ps n Device Status Report (DSR). Ps = 5 ⇒ Status Report. Result ("OK") is CSI 0 n Ps = 6 ⇒ Report Cursor Position (CPR) [row;column]. Result is CSI r ; c R Note: it is possible for this sequence to be sent by a func- tion key. For example, with the default keyboard configura- tion the shifted F1 key may send (with shift-, control-, alt- modifiers) CSI 1 ; 2 R , or CSI 1 ; 5 R , or CSI 1 ; 6 R , etc. The second parameter encodes the modifiers; values range from 2 to 16. See the section PC-Style Function Keys for the codes. The modifyFunctionKeys and modifyKeyboard resources can change the form of the string sent from the modified F1 key. ```
Author
Owner

@DHowett-MSFT commented on GitHub (Mar 20, 2020):

Note for actionable issue titles: there are hundreds of “ANSI Sequences,” so it’s very helpful if you call out the one that isn’t supported when you write the title of the issue.

@DHowett-MSFT commented on GitHub (Mar 20, 2020): Note for actionable issue titles: there are hundreds of “ANSI Sequences,” so it’s very helpful if you call out the one that isn’t supported when you write the title of the issue.
Author
Owner

@j4james commented on GitHub (Mar 21, 2020):

I actually have a patch for this stashed somewhere, but I got sidetracked looking into refactoring the parameter handling in the state machine (which is somewhat necessary for a strictly correct DSR implementation, but not really essential).

So if there's any urgency for this, I can always dig up my original solution from the stash (it probably just needs a unit test or two). But I suspect you probably won't be accepting feature PRs like this until after the May release anyway.

@j4james commented on GitHub (Mar 21, 2020): I actually have a patch for this stashed somewhere, but I got sidetracked looking into refactoring the parameter handling in the state machine (which is somewhat necessary for a strictly correct DSR implementation, but not really essential). So if there's any urgency for this, I can always dig up my original solution from the stash (it probably just needs a unit test or two). But I suspect you probably won't be accepting feature PRs like this until after the May release anyway.
Author
Owner

@ghost commented on GitHub (Apr 22, 2020):

:tada:This issue was addressed in #5300, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.🎉

Handy links:

@ghost commented on GitHub (Apr 22, 2020): :tada:This issue was addressed in #5300, which has now been successfully released as `Windows Terminal Preview v0.11.1121.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.11.1121.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7050