Extend GetConsoleMode or add an new API set, to allow guest programs to distinguish CONHOST and Windows Terminal #1533

Closed
opened 2026-01-30 22:29:44 +00:00 by claunia · 1 comment
Owner

Originally created by @reli-msft on GitHub (Jun 5, 2019).

An equivalance to $TERM but more powerful:

HRESULT GetTerminalSupport(HANDLE hConsole, LPCWSTR featureName, INT *pSupport);

featureName may include "FontFallback", "Emoji", "Ligatures", etc.

Originally created by @reli-msft on GitHub (Jun 5, 2019). An equivalance to `$TERM` but more powerful: ```cpp HRESULT GetTerminalSupport(HANDLE hConsole, LPCWSTR featureName, INT *pSupport); ``` `featureName` may include "FontFallback", "Emoji", "Ligatures", etc.
claunia added the Issue-FeatureResolution-DuplicateArea-InteropProduct-Conpty labels 2026-01-30 22:29:44 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 6, 2019):

Hey @reli-msft, thanks for suggesting this.

Since we're in Windows, we're very, very hesitant to introduce additional APIs. They need board review, and we can only release new APIs with new versions of Windows. The sheer complexity of doing that, especially given that the long tail of applications will never use this particular one, gives me a lot of pause.

This one in particular is complicated by the fact that we'd need to extend the pseudoconsole protocol, which today is simply raw VT52/100/220 over two pipes (we'd like to keep it that way!), to support some modicum of feature detection requests... and then beg all future terminals that consume the pseudoconsole API to also play along by answering feature requests. It'd be a step backwards on our equitable participation in standards to ask that just yet.

I'd like to come to a good solution here, but I'm not sure a new API is it. We should probably converge the discussion over in #1040, which is practically the same thing. 😄

@DHowett-MSFT commented on GitHub (Jun 6, 2019): Hey @reli-msft, thanks for suggesting this. Since we're in Windows, we're very, very hesitant to introduce additional APIs. They need board review, and we can only release new APIs with new versions of Windows. The sheer complexity of doing that, especially given that the long tail of applications will never use this particular one, gives me a lot of pause. This one in particular is complicated by the fact that we'd need to extend the pseudoconsole protocol, which _today_ is simply raw VT52/100/220 over two pipes (we'd like to keep it that way!), to support some modicum of feature detection requests... and then beg all future terminals that _consume_ the pseudoconsole API to also play along by answering feature requests. It'd be a step backwards on our equitable participation in standards to ask that just yet. I'd like to come to a good solution here, but I'm not sure a new API is it. We should probably converge the discussion over in #1040, which is practically the same thing. :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1533