Python: Sending Key Press Events Over Ssh
Solution 1:
Firstly, I recommend the PDF version of the xterm control sequences document; it was originally designed for paper and the automatic conversion to HTML is not perfect.
The history of terminal emulators is long and complicated, but one point is that the VT100 only had four function keys (PF1 through PF4), and when its successor the VT220 added another 16 function keys, the original coding scheme ran out of room, so they switched to a different one... but they used the old encodings of F1 through F4 for compatibility's sake. Therefore, although F5 is CSI 15 ~
, it's not true that F2 is CSI 12 ~
. Instead, especially if you're telling Paramiko that you're impersonating a VT100, you should use the VT100 encoding of F2, which is SSE Q
or '\eOQ
as a Python string.
I don't know if that's exactly what's causing your problem, but it's probably part of it.
Post a Comment for "Python: Sending Key Press Events Over Ssh"