Skip to content

DECRQSS (DCS $ q) not implemented — blocks truecolor detection despite truecolor being supported #52

Description

@tomlm

DECRQSS (DCS $ q <setting> ST) is not implemented. The name appears only in parser comments (ParserEvents.cs:132, EscapeSequenceParser.cs:118); there is no handler.

HandleDcsHook accepts one identifier and drops the rest:

if (identifier != "q" || !_terminal.Options.SixelEnabled)

so $q is swallowed with no reply.

Why it matters. DECRQSS is how an application asks the terminal to read back a setting it just made, and the truecolor probe is the common case: send SGR 38:2:1:2:3, then DCS $ q m ST, and compare what comes back. A terminal that answers with the RGB intact supports 24-bit colour; one that answers with an approximated 256-colour index does not; one that says nothing is assumed not to support the query. ucs-detect reports DECRQSS Truecolor? No for that last reason — which is a shame, since this emulator does do truecolor and advertises it via COLORTERM.

Reply format.

  • valid: DCS 1 $ r <setting> ST
  • invalid/unsupported: DCS 0 $ r ST

Settings worth answering. m (SGR) first, since it is the one applications actually probe with. Then r (DECSTBM), s (DECSLRM, once #46 lands), SP q (DECSCUSR), "p" (DECSCL), "q" (DECSCA).

Note the same trap as #49 in the DCS space: $q and +q (XTGETTCAP) and q (DECSIXEL) all end in q and must not be conflated. The current identity comparison is at least explicit about this — whatever replaces it should stay that way.

Activity

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions