From: Nobuyoshi Nakada Date: 2008-09-05T21:59:17+09:00 Subject: Re: How to read a character at a time from STDIN without needing to press return key? Hi, At Thu, 4 Sep 2008 05:40:43 +0900, Kenneth McDonald wrote in [ruby-talk:313786]: > In the following bit of code: > > print STDIN.getc > STDOUT.flush > > The code for whatever key I type isn't actually printed out until I go > on to hit the return key. How can I have it printed as soon as I type > a character key? With io-console, you can do: print STDIN.getch http://www.rubyist.net/~nobu/ruby/io-console.tar.bz2 http://www.rubyist.net/~nobu/ruby/io-console-0.2.gem -- Nobu Nakada