ac76cbcc20
* Generate Ctrl-C events by calling GenerateConsoleCtrlEvent. I noticed that calls to this routine don't behave exactly the same as a real Ctrl-C keypress. In Python, pressing Ctrl-C immediately displays a new "KeyboardInterrupt" line. Calling GenerateConsoleCtrlEvent has no immediate effect, but after pressing Enter, Python displays a stack trace where a KeyboardInterrupt was raised. After some testing, I suspect the issue is that a real Ctrl-C keypress interrupts a blocking console read, but GenerateConsoleCtrlEvent does not. I also tried synthesizing Ctrl-C using (a) PostMessage with WM_{CHAR,KEYDOWN}, and (b) SendInput. I couldn't get either to work. * Recognize ESC sequences. The set of recognized sequences is ad hoc. * Recognize UTF-8-encoded characters and convert them to UTF-16. * The code currently uses a timeout to differentiate between pressing ESC and pressing a key that generates an ESC sequence. I have a theory that I can use the "Device Status Report" ESC sequences to avoid this timeout. |
||
---|---|---|
.. | ||
Agent.cc | ||
Agent.h | ||
AgentAssert.cc | ||
AgentAssert.h | ||
AgentDebugClient.cc | ||
ConsoleInput.cc | ||
ConsoleInput.h | ||
Coord.cc | ||
Coord.h | ||
EventLoop.cc | ||
EventLoop.h | ||
main.cc | ||
Makefile | ||
NamedPipe.cc | ||
NamedPipe.h | ||
SmallRect.cc | ||
SmallRect.h | ||
Terminal.cc | ||
Terminal.h | ||
Win32Console.cc | ||
Win32Console.h |