python - serial ctrl+a escape sequence -


I am using pyserial to create serial applications. I'm looking for ASCII or ANSI escape sequence for CTRL + A and CTRL + E (respectively, initially and finally, respectively). I can not find the escape code anywhere, does anyone locate a resource that lists the code? CTRL + A and CTRL + E seem to be at the beginning of the line and cursor at the end of very universal cursor line control keys. I believe that an escape sequence exists.

Any suggestions would be appreciated!

Neither the ASCII character and the ANSI control code actually define a thing called "CTRL + A" Are there.

However, ASCII control characters 0-31 (formally US names through NUL) are traditionally printed as mapped as a "control version" of 64-95 characters , ^ 0 ^ ^, ^ 1 ^, 2 ^ ^ b, etc.

Wikipedia gives further information on the page.

So, ^ 1 is, and ^ E5 is


In the meantime:

CTRL + A and CTRL + E line appears to be very universal cursor to start the line and cursor by the control key.

They are not universal, these are part of "original emacs control keys", which are used by several UNIX terminal emulators and some Unix-based GUI applications (and libreadline CLI Library and Qt text widget) Support by conference. However, in A, say, try to kill a dos prompt or Microsoft Word and it will not come in the beginning of the line.

And, ANSI-compliant terminal does not necessarily move the cursor to the beginning or end of the line. To do it properly, you want to actually send ANSI control sequences related to ANSI escape codes, such as, will show you what is available.

Unfortunately, there is is there is no correct answer that you are trying to do. ANSI does not make the whole 80x25 (or whatever) screen accessible, and does not differentiate between those character positions, in which some of them are empty, you can not go to the "end of line" unless you Do not mean "column 79".

And, if what you are looking for is increasing in columns 0 and 79, this is the CAA command ( '\ x1b [0G' and Easy with '\ x1b [79G' ) - but not all ANSI terminals are supported; Specifically, DOS ANSI. Being compatible with SES and anything will ignore it.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -