Hi,
In message "[ruby-talk:9106] Grabbing a char from the keyboard..."
on 01/01/11, "Hal E. Fulton" <hal9000 / hypermetrics.com> writes:
|How does one accept a character from the keyboard
|as soon as it is pressed?
I often uses stty trick.
system("stty raw -echo")
begin
c = STDIN.getc
ensure
system("stty raw -echo")
end
It works between various UNIXes and Cygwin.
matz.