Nit Khair wrote:
> Michael Fellinger wrote:
> 

> 
> However, it does not accept/print the Alt-keys - is that deliberate, or 
> did have you not looked into it.
> 
> I have had problems with alt-keys (since they generate 2 bytes and that 
> goes thru my getch() loop twice, often leaving an extra char in the edit 
> field.

manver, I have figured out one thing about alt keys. To do this i had to 
make: PRINTABLE = ASCII
until someone can tell me why irb != ruby.

In osx, there is a terminal option "Use alt as meta key".  Now "alt" 
gives me the same result as using Esc. So now, alt-a and Esc-a will both 
generate "M-a".
Without this setting, alt-a gives 165, alt-b = 171, alt-c = 167 which is 
not contiguous, and generates some junk chars.

So now i've basically duplicate esc and alt. But i accidentally 
discovered something ... I can press "Esc ^A", or "Alt ^A" so i do have 
a bunch more of keys i can map! Hope there's nothing more i've missed.

Your file keyboard.rb rocks, please make it a gem, so others CUI 
programmers can benefit from it. Preferably standalone.
-- 
Posted via http://www.ruby-forum.com/.