From: Michael Linfield Date: 2007-09-01T17:40:16+09:00 Subject: Re: keyboard input: one character gu wrote: > i've come across the library highline ( http://highline.rubyforge.org/ > ). the simplest program > > require "highline/system_extensions" > include HighLine::SystemExtensions > #print "Enter one character: " > while true > char = get_character > if char != nil > puts char.chr > end > end info = gets.chomp if info != nil puts info end or more elaborately you would use it like the following: info = gets.chomp if info != nil puts "You Entered the Character: #{info}" end Hoped this helped. -- Posted via http://www.ruby-forum.com/.