winpty/agent
Ryan Prichard ac76cbcc20 Initial checkin of improved console input handling.
* 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.
2012-03-19 21:30:16 -07:00
..
Agent.cc Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
Agent.h Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
AgentAssert.cc Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
AgentAssert.h Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
AgentDebugClient.cc Rename Agent to agent. 2012-01-21 17:32:26 -08:00
ConsoleInput.cc Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
ConsoleInput.h Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
Coord.cc Various changes intended to help with debugging. 2012-03-15 01:59:12 -07:00
Coord.h Various changes intended to help with debugging. 2012-03-15 01:59:12 -07:00
EventLoop.cc Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
EventLoop.h Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
main.cc Checkpoint work to replace the Qt event loop and I/O code. 2012-03-13 22:14:39 -07:00
Makefile Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
NamedPipe.cc Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
NamedPipe.h Checkpoint work on the EventLoop and NamedPipe classes. 2012-03-14 02:37:18 -07:00
SmallRect.cc Various changes intended to help with debugging. 2012-03-15 01:59:12 -07:00
SmallRect.h Fix SmallRect::intersected. 2012-03-15 02:01:41 -07:00
Terminal.cc Try to improve the way color works in the agent. 2012-03-15 04:08:58 -07:00
Terminal.h Fix a bug involving the Terminal::finishOutput call. 2012-03-15 02:11:03 -07:00
Win32Console.cc Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00
Win32Console.h Initial checkin of improved console input handling. 2012-03-19 21:30:16 -07:00