Query keyboard mapping or miscellaneous information.
query
is a hex encoded string. It can be the encoded form of either a terminfo/termcap key names (e.g. 'kf1') or a string for one of the following additional information:
query pre hex encoding | meaning |
---|---|
colors | query number of palette colors supported. Return is either '256', '88' or '16' (after hex decoding) See 256 colors palette. |
Co | |
RGB | Report significant bits for direct color display. Format is either a number (e.g. '8') or r /g /b (e.g. '5/6/5') where the number or each of r , g , b signifies how many significant bits of the direct color the terminal will be able to reproduce.If direct color is not supported the result contains '-1'. See direct color. |
name | query name of initial terminal description (e.g. 'xterm') |
TN |
See use "tcap" keyboard mapping for key names.
The terminal replies with:
ESCP0+rESC\
in case the query was invalid or did not return a result.
or
ESCP1+rⓈ=ⓈESC\
Where query
is the original query string (also hex encoded) and result
is the result in hex encoding.
If the query
parameter is valid but no data is available result
and the preceding = are omitted from the reply.
The sequence may contain more than one query, in that case the hex encoded query strings are separated by ; and the replies will contain a part Ⓢ=Ⓢ separated by ; for each query the terminal reports a result for.
🛈 xterm aborts processing with the first query that is not successful, all further query parts are ignored.