f



How to send UP arrow key to popen child

Hi,

I am using popen(..., "w") to open a process and write the command to
it. Originally the program can receive UP arrow/DOWN arrow key event,
but I don't know how to send these keys through fwrite.

Thanks in advance.

Bin
0
binary.chen (324)
3/21/2008 7:29:47 AM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (349) is leader. Post Follow

1 Replies
2484 Views

Similar Articles

[PageSpeed] 48

Bin Chen wrote:
> Hi,
> 
> I am using popen(..., "w") to open a process and write the command to
> it. Originally the program can receive UP arrow/DOWN arrow key event,
> but I don't know how to send these keys through fwrite.
> 
> Thanks in advance.
> 
> Bin

"\x1B[A" is the ANSI escape sequence that corresponds to the up arrow 
key, and "\x1B[B" is for down.  I'm not completely sure that will work, 
though.

--
--Falcon Kirtaran
0
falconnews (31)
4/9/2008 8:42:14 PM
Reply: