From: Bertram Scharpf Date: 2007-08-26T09:16:59+09:00 Subject: Re: Newbie questions Hi, Am Sonntag, 26. Aug 2007, 07:00:06 +0900 schrieb William James: > On Aug 25, 3:05 pm, "Barr, Keith" wrote: > > I have a menu that I would like users to respond to > > simply by entering a single character. > > def getkey > select( [$stdin], nil, nil, 0.01 ) ? c = $stdin.getc : c = nil > end Why `c=卒? Why twice? It doesn't work here; it still waits for the enter key. I doubt whether there is any other way than using termios. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de