How can I get a single keyboard character from the terminal with Ruby without pressing enter? I tried Curses::getch, but that didn't really work for me.
Curses::getch
Since ruby 2.0.0, there is a 'io/console' in the stdlib with this feature
require 'io/console' STDIN.getch
1.4m articles
1.4m replys
5 comments
56.9k users