开发者

How can I send arrow key presses to a process using Expect.pm

Seems like this should be obvious, but how do I send arrow key presses to a process using Expect.pm? Does it depend on the terminal type I am using (vt100) or do I s开发者_开发技巧end keyboard scancodes?

TIA.


It does indeed depend on your current TERM environment variable. Once that's set correctly (say VT220 or linux), then arrow keys are

up:    "\c[[A"
down:  "\c[[B"
left:  "\c[[D"
right: "\c[[C"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜