From: Marcelo Date: 2008-01-19T01:45:24+09:00 Subject: Re: Quit, if a specific key is hit On Jan 18, 2008 4:19 AM, Pavankumar Kulkarni wrote: > I found a platform independent solution to this in one of the comments > of that link(below) here > . That does not fulfill the stated requirements, does it? > > i=0 > loop do > begin > break if STDIN.read_nonblock(1000) C defines stdin to be buffered, so characters will pile up in the buffer until an EOL is seen or the buffer is full. It might be the case that some platform does not do this, but in general the program won't stop until you press a lot of keys or (usually), press enter. Marcelo