From: thefed Date: 2008-01-01T02:59:21+09:00 Subject: Re: Detecting Arrow Keys On Dec 31, 2007, at 3:34 AM, tho_mica_l wrote: >> Hmm... Something's not right here... Why are they all the same? > > Cursor keys on the terminal are most often sent as a sequence of three > characters: > > 27, '[', 'A' ... up > 27, '[', 'B' ... down > 27, '[', 'C' ... right > 27, '[', 'D' ... left > > 27 is escape. > > I don't know why you'd want to check for cursor keys but if it's for > line editing you're probably better of with using a library that > already does this. I'm not 100% sure but Highline (http:// > highline.rubyforge.org/) might be of help here. hehe I use highline regularly, and so far, I do not know of any way to emulate history with it, or detect arrow keys. But, in short, does this mean that there is no way to detect the arrow keys?