From: Payton Swick Date: 2006-01-25T11:57:26+09:00 Subject: Re: How to capture a pressed key? It's just not as easy as it may seem. This is true of any language. Basically it depends on the environment (UI) that you're using to interface with the user. I would suggest (perhaps) Ncurses, since it's designed to handle that sort of thing (the shell isn't). Perhaps I'll write a simple Ncurses gem to do this for you sometime... Good luck. -Payton Rubyist wrote: > Hi, > > How can I capture a key from keyboard in a console program? I mean, I > want to get an answer consisted of only one letter and the user will > not press "enter". Just a key, that's all. > > Thank you. >