Hi,

matz / zetabits.com (Yukihiro Matsumoto) wrote:

> |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")
      system("stty -raw echo")
>   end

correct?


--
Hideto "rubyholic" ISHIBASHI  http://www.rr.iij4u.or.jp/~hideto-i/