A Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.
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 | ||
include | ||
libpconsole | ||
Misc | ||
Shared | ||
TestNetClient | ||
TestNetServer | ||
unix-adapter | ||
.gitignore | ||
config-mingw.mk | ||
config-unix.mk | ||
config.mk | ||
deploy.sh | ||
Makefile | ||
Notes.txt |