如何在Ruby中捕获终端方向键? [英] How can I capture terminal arrow keys in Ruby?
本文介绍了如何在Ruby中捕获终端方向键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在终端中捕获箭头键,用户不必在箭头键后按enter?
How can I capture arrow keys in a terminal, without the user having to press "enter" after the arrow key?
推荐答案
p>查看Ruby控制台库 ruby-termios
和 ncurses-ruby 。
Look into the Ruby console libraries ruby-termios and ncurses-ruby.
这篇关于如何在Ruby中捕获终端方向键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文