From: Dan Zwell Date: 2007-08-26T05:36:56+09:00 Subject: Re: Newbie questions Barr, Keith wrote: > Hi there, > > I am new to using Ruby and I am writing my first real programs and I have something I was wonndering about: > > I have a menu that I would like users to respond to simply by entering a single character. I have tried both STDIN.getc and gets, but both require a carriage return. Is there a command I haven't found that will actively read STDIN to process a single character as soon as it is entered? > > Thanks in advance, > Keith This is a common question. You need a library (gem) that provides this function. I have heard that highline, ncurses, and termios have this. In ncurses, it's called "getch", but I don't know about the others. Dan