From: Bryan B. <br...@bu...> - 2008-12-12 13:46:58
|
> On Thu, Dec 11, 2008 at 03:53:11PM -0500, Bryan Bueter wrote: >> > On Fri, Dec 05, 2008 at 08:52:46PM -0800, Robin Lee Powell wrote: >> >> >> >> I'm trying to send arrow keys to a curses app of mine. Rather >> >> than distributing that app, here's an example using "mutt", which >> >> is fairly common: >> > >> > No-one knows how to send arrows to curses apps in Expect? >> > >> > -Robin >> > >> >> By my reckoning, you have your string incorrect. The following should >> be >> arrow keys: >> >> $up = "\c[[A"; >> $down = "\c[[B"; >> $left = "\c[[D"; >> $right = "\c[[C"; >> >> and not "\e[[B"; > > I wasn't sending \e[[B, I was sending \e[B. > > \e == \c[ (that is, ESC is the same as ^[; I actually use ctrl-[ at > the keyboard most of the time to send ESC). > > I did explicitely try $exp->send("\c[[B");, though. No change > (i.e., nothing happens). > > -Robin > Yes, i see that now. When i type: cat > test.txt Then hit the arrow key it gives me control+[[B, thats why i suggested that and not escape+[B. And i pulled \e[[B from my memory of your previous e-mail, not from the e-mail itself. So my apologies. As for running mutt through expect, it seems to ignore everything i send, even if I just try and open it up quit. So I dont think there is actually anything wrong with what your sending, just how its being interpreted by mutt. Bryan Bueter http://sourceforge.net/projects/rover |