>>>>> "M" == Matthew PATTISON <mfp / students.cs.mu.OZ.AU> writes:

M> Thanks, I can now catch Esc being pressed, but I'm not sure how to use
M> IO::select. The Pickaxe book doesn't go into a lot of detail. What would
M> be the readArray in this instance, (I'm lookiing at p332 & p426 of Programming
M> Ruby)	and what exactly is returned from the function call, and how do I 
M> extract from it what character has been pressed? 


 Here a little example

   if getch == 0033
      keys = []
      while IO.select([$stdin], nil, nil, 0)
         keys.push getch
      end
   end

 If you can read something from $stdin, IO::select will return the array
 [$stdin] otherwise it will return nil.

 if keys.empty? you have read only an Esc, otherwise a function key


M> Also, before, for instance, when I typed in an up arrow, ^[[A came up on the
M> screen. Now that I am catching Esc, [A comes up. How can I get it so that
M> nothing shows up on the screen.

 use Curses#noecho


Guy Decoux