Is there a way to do sendcontrol?
andy8leung opened this issue · 4 comments
andy8leung commented
In Pexpect, you can issue a ctrl-c command like expect.sendcontrol('c'). Is there a way to do this with goexpect?
skalle commented
Ctrl-c Should just be as simple as sending the number 3 , not the asciicharacter 3 mind you ..
e.Send("\003")
https://www.asciitable.com/
http://jkorpela.fi/chars/c0.html
skalle commented
Hey al31n , did sending CtrlC work for you?
andy8leung commented
Hi Skalle, sorry for the late response. Yes sending Ctrl C works. Thanks!
sateesh2020 commented
Hi @al31n
Did e.Send("\003") worked for you .
I was trying to do something similar where i need to send CTRL-K and the ASCII for it is \013
.
But no luck.