I have to send F2 key to telnet host. How do I send it using python...using getch()
I found that the character <
used for the F2 key but when sending >
, its not working. I think there is a way to send special function keys but I am not able to find it. If somebody knows please help me. Thanks in advance
Extended keys (non-alphanumeric or symbol) are composed of a sequence of single characters, with the sequence depending on the terminal you have told the telnet server you are using. You will need to send all characters in the sequence in order to make it work. Here, using od -c <<< '
CtrlVF2'
I was able to see a sequence of \x1b0Q
with the xterm
terminal.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)