Simplest working way to get ARROW KEY LEFT + ALT key to call a method

Hi,

I am playing with HighLine and Rawline lately.

What I am trying to do is simple:

I fetch user input via Readline.readline
but I also want to respond when the user press the ALT key and the LEFT
ARROW key.

Xev says that left arrow key has keycode 113.

Xev says Alt has keycode of 64 and is called Alt_L.

Ok, is there an easy way to call a method when this combination is
pressed?

With RawLine you can make Ctrl+key work like Ctr-x.

But I have not found out how to make it work with Alt …

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