Control characters in ruby

Hello all,
I wanted to know how to accept control characters such as ESC, F1,
F2 from a command line in Ruby. I’m working on Opensuse (11.1) Linux.


Cheers & Regards,
Arun K. M S
Systems Engineer,
AVK systems,
IIIT-B campus,
Electronic city,
Bangalore
www.avksystems.com

(04/20/2011 07:57 PM), Arun K. wrote:

Hello all,
I wanted to know how to accept control characters such as ESC, F1,
F2 from a command line in Ruby. I’m working on Opensuse (11.1) Linux.

http://c-faq.com/osdep/cbreak.html

(hint: Ruby is written in C)

Thank you so much. The solution for my case lies in ncurses or related
libraries (rbcurse, ffi-ncurses)…

On Wed, Apr 20, 2011 at 4:59 PM, Urabe S. [email protected]
wrote:


Cheers & Regards,
Arun K. M S
Systems Engineer,
AVK systems,
IIIT-B campus,
Electronic city,
Bangalore
www.avksystems.com

(04/21/2011 02:40 AM), Arun K. wrote:

Thank you so much. The solution for my case lies in ncurses or related
libraries (rbcurse, ffi-ncurses)…

FYI ruby has standard library support for curses. I don’t know if Suse
ships
their ruby with that feature compiled in but I’m sure they have it
somewhere
in their package system.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs