Re: PATCH: Use getche on Win32

Mark Mitchell
2005-05-11T07:13:17Z

Eli Zaretskii wrote:
>>Date: Tue, 10 May 2005 17:42:18 -0400
>>From: Christopher Faylor <me@cgf.cx>
>>
>>>>Does Windows offer anything like appropriate job / pgrp semantics?
>>>>That'd really surprise me.
>>>
>>>Windows does support CTRL-C and does have process groups. I don't know
>>>how close the concept of a windows process group is to UNIX, though.
>>
>>Btw, there are other alternatives to using getche. You could just set
>>the correct mode using SetConsoleMode.
>
>
> Right, and judging by what MSDN has to say about this, it's precisely
> what Mark needs to get Readline do on Windows what it does on
> platforms that support termios and similar Posix functionalities.
>
> As for Ctrl-C, the same SetConsoleMode can evidently cause it to raise
> SIGINT, as we want.

Strangely, I'd looked at that before, but not fully comprehended. I'll
experiment. ENABLE_PROCESSED_INPUT may, however, cause certain
characters (like the arrow keys) never to reach readline, thereby
preventing some of the key-binding magic. I'll try a few approaches,
and report back.

Thanks,

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304