如何在Ruby中捕获终端方向键? [英] How can I capture terminal arrow keys in Ruby?

查看:146
本文介绍了如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆