From: Roger Pack Date: 2010-07-07T02:00:36+09:00 Subject: Re: RCR getch Oops I missed a require: >> require 'io/console' => true >> STDIN.getch > Excellent. I'm glad this was added then. > > This appears to not work on windows is that expected? It does work, and, though it doesn't get arrow keys, it's good enough for my intents and purposes. NB if you *do* want arrow keys you'll want to wrap _getch or _getkbhit, like rb-readline does. See also [1].. -r [1] http://betterlogic.com/roger/?p=2930 For google's sake, here's what it does when you *don't* first require io/console: >> STDIN.getch NoMethodError: undefined method `getch' for #> from (irb):1 from C:/installs/ruby_trunk_installed/bin/irb.bat:20:in `
' -- Posted via http://www.ruby-forum.com/.