Terminal: ConPTY Passthrough mode

Created on 16 Jul 2019  路  3Comments  路  Source: microsoft/terminal

I've discussed this a couple times on different threads before, but I think I never made a real issue for it.

The idea of conpty passthrough mode is that a commandline client application that _knows_ it's only going to use VT sequences (and __not__ the API) to modify the console could set a special mode, ENABLE_PASSTHROUGH_MODE. If conpty is active, the console would then _stop_ rendering itself over conpty, and anything that was written to the console would go straight to the terminal.

  • This would work especially well for something like wsl, where it's only ever going to be talking VT.
  • It would _not_ work for cmd.exe, because of cmd.exe's heavy reliance on the API.
  • Windows Powershell again needs the API pretty heavily, but maybe Powershell Core, which is cross-platform, could make use of it.

This has some rough edges that need to be sorted out.

  • [ ] What happens when the app exits, and passthrough mode is turned off? The terminal and conpty's buffers would not be equivalent anymore!

    • I've been toying with the idea of having conpty both pass the sequences through, and also process them itself, so that the terminal and conpty stay in sync.

  • [ ] What happens when someone tries to call Console API's in passthrough mode?

    • I'm thinking we just cause them to fail. All save for Get/SetConsoleMode and reading input / writing output.

    • We'll also probably need to be able to read resize events.

This needs a real spec written, but it probably needs prototyping done before that.

Area-Server Issue-Feature Needs-Triage Product-Conpty Resolution-Duplicate

Most helpful comment

_oh my god I've filed a dupe, you can go ahead and draw and quarter me now_

All 3 comments

This may actually be #1173?

_oh my god I've filed a dupe, you can go ahead and draw and quarter me now_

mfw "draw and quarter me now": 馃馃槺

Was this page helpful?
0 / 5 - 0 ratings

Related issues

warpdesign picture warpdesign  路  3Comments

miniksa picture miniksa  路  3Comments

ghvanderweg picture ghvanderweg  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

xmm1989218 picture xmm1989218  路  3Comments