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"
精彩评论