Superscript and Subscript (SGR 73, 74, 75) #4303
Unanswered
mnemnion
asked this question in
Feature Requests, Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
These aren't ECMA standardized, and don't exist in XTerm. They're supported by minTTY and Wezterm, possibly more but at least those. Here's some background, there are more canonical / historical printer codes for these attributes, but XTerm recently introduced a query for
XTMODKEYSwhich conflicts with those other versions, and even more recently, a second way to query using aDECQRSSsequence, which may deprecate the conflicting sequence over time.VTE doesn't support either of them, but specifically won't support the ones listed in the title.
My take is basically: super and subscript are nice, I don't personally care about them being ahistorical and nonstandard, XTerm should have been using
DECQRSSto begin with, and it's less conceptual burden on application code to use familiarSGRstyle for these sequences.As a point of interest, the historical private-use codes were printer only, are called
DECSGRin the literature, andCSI ?4 mactivates subscript, withCSI ?24 mdeactivating it, and superscript using?5and?25. These can be considered more correct because the?makes them a private sequence. But then again, ECMA 48 is, shall we say, no longer leading the way for terminal emulators, and standards should respond to facts on the ground.The version I'm proposing here uses
CSI 73 mfor subscript,CSI 74 mfor superscript, andCSI 75 mfor neutral, resetting either of these sequences. The latest, 5th edition of ECMA 48 is silent on the subject of anySGRcode larger than 65, but Xterm has used the 90 and 100 sequences for a long time, which Ghostty also supports, so the cat is out of the bag on that. I do remember 1991, but it was a long time ago.I know that Ghostty has some basic support for modifyOtherKeys, I haven't tried querying it so I don't know if there's already a conflict with the
DECSGRvariants. Using the nonstandardSGRversions (as here suggested) would avoid such a conflict arising, however. If theDECSGRvariants were to catch on in future, it would not be out of the question to support them both.Beta Was this translation helpful? Give feedback.
All reactions