terminal/src
James Holderness 53b224b1c6
Add support for DA2 and DA3 device attributes reports (#6850)
This PR adds support for the `DA2` (Secondary Device Attributes) and
`DA3` (Tertiary Device Attributes) escape sequences, which are standard
VT queries reporting basic information about the terminal.

The _Secondary Device Attributes_ response is made up of a number of
parameters:
1. An identification code, for which I've used 0 to indicate that we
   have the capabilities of a VT100 (using code 0 for this is an XTerm
   convention, since technically DA2 would not have been supported by a
   VT100).
2. A firmware revision level, which some terminal emulators use to
   report their actual version number, but I thought it best we just
   hardcode a value of 10 (the DEC convention for 1.0).
3. Additional hardware options, which tend to be device specific, but
   I've followed the convention of the later DEC terminals using 1 to
   indicate the presence of a PC keyboard.

The _Tertiary Device Attributes_ response was originally used to provide
a unique terminal identification code, and which some terminal emulators
use as a way to identify themselves. However, I think that's information
we'd probably prefer not to reveal, so I've followed the more common
practice of returning all zeros for the ID.

In terms of implementation, the only complication was the need to add an
additional code path in the `OutputStateMachine` to handle the `>` and
`=` intermediates (technically private parameter prefixes) that these
sequences require. I've done this as a single method - rather than one
for each prefix - since I think that makes the code easier to follow.

VALIDATION
----------

I've added output engine tests to make sure the sequences are dispatched
correctly, and adapter tests to confirm that they are returning the
responses we expect. I've also manually confirmed that they pass the
_Test of terminal reports_ in Vttest.

Closes #5836
2020-07-10 22:27:47 +00:00
..
buffer Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
cascadia Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
dep Move all wildcards into targets or expand them (#6406) 2020-06-08 14:01:47 -07:00
host Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
inc Improve the propagation of color attributes over ConPTY (#6506) 2020-07-01 11:10:36 -07:00
interactivity Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
internal Merged PR 4271163: [Git2Git] Remove use of private theme APIs 2020-02-03 23:13:31 +00:00
propsheet Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
propslib Find icon from shortcut target if shortcut doesn't specify it (#6277) 2020-06-01 17:19:05 +00:00
renderer Refactor the renderer color calculations (#6853) 2020-07-10 22:26:34 +00:00
server Reintroduce a color compatibility hack, but only for PowerShells (#6810) 2020-07-10 15:25:39 -07:00
terminal Add support for DA2 and DA3 device attributes reports (#6850) 2020-07-10 22:27:47 +00:00
testlist inbox: Merge accumulated build fixes from RS_ONECORE_DEP_ACIOSS (#1002) 2019-05-24 12:28:30 -07:00
til Fix the x86 build and re-enable x86 CI (#6467) 2020-06-11 17:04:42 +00:00
tools fix scheme name resolution, and schema load on WSL (#5327) 2020-07-01 20:15:09 +00:00
tsf Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
types Account for WHEEL_DELTA when dispatching VT mouse wheel events (#6843) 2020-07-09 23:24:17 +00:00
winconpty Add support for win32-input-mode to conhost, ConPTY, Terminal (#6309) 2020-06-08 22:31:28 +00:00
common.build.post.props Add experimental retro terminal effects (#3468) 2019-12-12 13:44:01 +00:00
common.build.pre.props Enable Control Flow Guard in the common build props (#5453) 2020-04-22 11:30:13 -07:00
common.build.tests.props Move ConPTY to use til::bitmap (#5024) 2020-03-23 15:57:54 +00:00
ConsolePerf.regions.xml Tab to spaces (#578) 2019-05-13 18:06:36 -07:00
ConsolePerf.wprp Fix the WPR profile (#4007) 2019-12-17 17:14:15 -08:00
cppwinrt.build.post.props deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
cppwinrt.build.pre.props Fix the build in VS 2019 16.7 (#6838) 2020-07-09 04:10:50 +00:00
dirs build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
project.inc build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
project.unittest.inc inbox: merge refactoring payload from FI 2019-06-11 17:01:26 -07:00
StaticAnalysis.ruleset Combined changes to make the build work again (see inside) (#2945) 2019-09-30 10:39:55 -07:00
unit.tests.x64.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
unit.tests.x86.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.post.props Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.pre.props Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00