Search code examples
rubyescapingarrow-keys

How can I capture terminal arrow keys in Ruby?


How can I capture arrow keys in a terminal, without the user having to press "enter" after the arrow key?


Solution

  • Look into the Ruby console libraries ruby-termios and ncurses-ruby.