What is the exit code VT100 for the keyboard key "esc"

I am writing a script to navigate a menu text system using python telnetlib to access a serial connection.

I can happily press the F keys using escape codes. for example F9 = "\ 033OX", where "\ 033" is the escape sequence.

How to encode the keyboard "esc"? I would just expect "\ 033", but that doesn't work.

+3
source share
2 answers

Put a slight delay, say, 1.5 seconds, after sending the escape, so that the other side realizes that this is an isolated output, and not part of a longer sequence.

+5
source

, "escape-" ESC VT-100 ( , escape-).

, ASCII 27, , , . . , , , , , , , . ES# 6 .

, H-19/VT-52 ESC H , ESC E , ESC J .. VT-100 ESC [H home ESC [2 J .

, , ( ) , , , . "2" ESC [2 J (), (). J ​​K, , , . . ESC [row; col H /col, . ESC [12; 34 H 12, 34. .

ESC, .

, ESC , , . , ESC [21 ~ F10.

, ESC. .

, ESC . , , , . , , , -, ESC ESC. .

, , ESC ESC. escape- escape-, . , , "\" "\", . -. , , , , , . , , , escape-, .

, "" ESC , ESC , , , ( -). , , , , . , ESC Space , ESC , .

, . , TECO , ESC , , .

+5

Source: https://habr.com/ru/post/1736389/


All Articles