From: sos AT prospect DOT com DOT ru (Sergey Okhapkin) Subject: RE: Re[2]: console mode and \r, \n, etc. 5 Dec 1998 06:01:44 -0800 Message-ID: <01BE202A.8F53C660.cygnus.cygwin32.developers@sos> To: "cygwin32-developers AT cygnus DOT com" , "'Paul Sokoilovsky'" Paul Sokolovsky wrote: > Yes, but it has problems too, even bugs. For example, if you care > about it, win95 has problems with localization features when using > ReadConsoleInput() - it just bypass keyboard localizer (which is dos > program at all). Here's how it worked around: > > int rl_getch() > { > int key=0; int mask=0; > > if (pending_flag) { pending_flag=0; return pending_key; } > > for (;;) > { > WaitForSingleObject(STDIN,INFINITE); > if (!PeekConsoleInput(STDIN,&ir,1,&dummy)) goto FromFile; Your code example is based on console read code originally written by me and Boris Usievich, and is incompatible with windows NT (some keys like ESC, shift-tab etc are handled incorrectly). I have a working code for both NT and 95 and will be ready to implement it in cygwin after console code reorganization (Chris, is the work in progress?). -- Sergey Okhapkin, http://www.lexa.ru/sos Piscataway, NJ