Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
看起来这应该很明显,但是如何使用 Expect.pm 将箭头键按下发送到进程?这取决于我使用的终端类型(vt100)还是我发送键盘扫描码?
TIA。
它确实取决于您当前的 TERM 环境变量。一旦设置正确(比如 VT220 或 linux),然后箭头键
up: "\c[[A" down: "\c[[B" left: "\c[[D" right: "\c[[C"