Re: Escape Codes




Martin Krischik <krischik@xxxxxxxxxxxxxxxxxxxxx> writes:

brian.b.mcguinness@xxxxxxxx schrieb:
Google for ANSI escape sequences
Results include:
http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html
http://isthe.com/chongo/tech/comp/ansi_escapes.html
http://en.wikipedia.org/wiki/ANSI_escape_code

None of which will tell you which sequence the terminal sends when
i.E. you press the <Home> or <End> key :-(.

But Georg's hint to search for "Xterm Control Sequences" turned up
http://sunsite.ualberta.ca/Documentation/Gnu/screen-3.9.4/html_chapter/screen_11.html
which does :-):

Home kh stuff \033[1~
End kH stuff \033[4~
Insert kI stuff \033[2~
Delete kD stuff \033[3~
Page up kP stuff \033[5~
Page down kN stuff \033[6~

My Xterm produces ^[[H~ for HOME and ^[[F~ for END.

You can check that by either pressing ^V and the key in the shell (if
you have readline) or by using cat.

Regards -- Markus

.



Relevant Pages

  • Re: Why does everyone do it?
    ... Did you see my hint about a first order language with two sorts, one for 'natural number' and one for 'sequence'? ... But for sequences, the players are allowed to give values for the various positions in the sequence at different moments in time, the only requirement being that for every natural number n, there is some time t at which xis given. ... you may even use ZFC if that's the only thing you understand. ...
    (sci.math)
  • Re: What is this series
    ... The question came from a sequence of numbers that relate to a computer ... An additional hint: The "solution" I have in mind would be virtually ... It's one of the reason for my theory that NO "artificial intelligence" ... mind work, in REAL intelligence in "pattern recognition". ...
    (sci.stat.math)
  • Re: Convert string to command..
    ... HINT: This error can also happen if the byte sequence does not match ... the encoding expected by the server, ... cursor.execute("INSERT INTO cache2 VALUES (?)", ...
    (comp.lang.python)
  • Re: A problem of 100 bucks
    ... available in unlimited quantity. ... use the Hint 1 to check if your approach is right or not. ... The "easy way" is to set up recursive equations and calculate N, ... A sequence of 1,1,1,1,1 was counted ...
    (sci.math)
  • Re: A problem of 100 bucks
    ... available in unlimited quantity. ... use the Hint 1 to check if your approach is right or not. ... The "easy way" is to set up recursive equations and calculate N, ... A sequence of 1,1,1,1,1 was counted ...
    (sci.math)