How should applications behave when running under Windows Terminal if they want to maximize functionality? #18127
Labels
Issue-Question
For questions or discussion
Needs-Discussion
Something that requires a team discussion before we can proceed
Needs-Tag-Fix
Doesn't match tag requirements
Hi, I'm working on a cross-platform readline-esque library and one of the goals is to take full advantage of the capabilities of whatever terminal emulator is being used.
From what I understood reading the Console API docs on MSDN, Windows Terminal seems to be trying to move away from the Win32 Console API and behave more like terminals on other platforms, supporting various CSI and DCS escape sequences etc., but I have some questions:
Since
termios
andioctl
don't exist in Windows, do we still use the Console API for things like getting Windows Terminal out of line-input mode, or requesting the window size?I made a small test program which sets the console mode to
ENABLE_VIRTUAL_TERMINAL_INPUT | ENABLE_PROCESSED_INPUT
and then readsKEY_EVENT_RECORD
s usingReadConsoleInputA()
. Underconhost.exe
, theKeyEvent.dwControlKeyState
field seems to be populated correctly, but under Windows Terminal it's always zero. Is there a way for applications to handle arbitrary keyboard input in Windows Terminal? If not, what approach should we be using to handle a many different key events as possible?Sorry if this is all documented somewhere and I missed it. Any links to further reading would be appreciated!
The text was updated successfully, but these errors were encountered: