Skip to content

Printing specific sequence causes device attributes sequence to appear #19120

Closed as not planned

Description

Windows Terminal version

1.22.11141.0

Windows build number

10.0.26100.0

Other Software

Python 3.13

Steps to reproduce

If the statement print('\x1b[1t\x1b[c\x1b[?1004h\x1b[?9001h\x1b[94mHi\x1b[0m\r\n') is executed in a Python interpreter, then the console outputs the sequence ^[[?61;4;6;7;14;21;22;23;24;28;32;42c, which corresponds to the device attributes escape sequence https://github.com/microsoft/terminal/blob/main/src/terminal/adapter/adaptDispatch.cpp#L1464, I don't know if this is expected

Expected Behavior

Image

Actual Behavior

Image

Activity

  1. added
    Issue-BugIt either shouldn't be doing this or needs an investigation.
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jul 10, 2025
  2. DHowett commented on Jul 10, 2025

    @DHowett
    Member

    Yes, \x1b[c is exactly how an application requests a device attribute report.

    If you request reports but do not read their responses, they will end up on the input line.

  3. DHowett commented on Jul 10, 2025

    @DHowett
    Member

    Now that I understand the problem report a bit more--thanks for linking the winpty-rs bug!--I wrote up some thoughts over there. Sorry if it came across as a brusque dismissal!

  4. andfoy commented on Jul 10, 2025

    @andfoy
    Author

    No worries! I actually opened this issue in order to get a better understanding of what's going on underneath, which is curious, given that I develop wrappers for ConPTY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions