Okay, I'll file a bug report. Maybe someone else on Windows could confirm this behavior?<div><div><div><br><div class="gmail_quote">On Sat, Aug 22, 2009 at 11:36 PM, Jason Dagit <span dir="ltr"><<a href="mailto:dagit@codersbase.com">dagit@codersbase.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Sat, Aug 22, 2009 at 2:14 PM, Peter Verswyvelen<<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>> wrote:<br>
> The following program<br>
> <a href="http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8445#a8445" target="_blank">http://hpaste.org/fastcgi/hpaste.fcgi/view?id=8445#a8445</a><br>
> should echo the ASCII code of each character the user types, on the fly,<br>
> with no line buffering whatsoever.<br>
> But it doesn't. At least not under Windows's cmd, and even less with msys.<br>
> Under Windows, I have to press enter before anything is printed to the<br>
> screen. It then always prints 71 (that's upper G, no idea where that comes<br>
> from), and then blocks. Pressing enter again prints the codes of all<br>
> characters typed, except the first one, following by the two codes of the<br>
> linefeeds. So e.g. when I type "abc" ENTER, I get 71, then hitting ENTER<br>
> again, I get 98 99 10 10.<br>
> Under msys, it just ignores both the hSetBuffering and hSetEcho, but when<br>
> hitting enter, it at least prints the codes correctly.<br>
> How does it behave under OSX and Linux? Is this a bug or am I doing<br>
> something wrong?<br>
<br>
</div></div>For me on OSX it has the intended behavior. Which is to say, every<br>
time I type a key I see the ascii value of the key. I have no idea<br>
why windows is being different.<br>
<font color="#888888"><br>
Jason<br>
</font></blockquote></div><br></div></div></div>