[haiku-development] Re: Terminal escape codes

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 19 Apr 2012 19:13:58 +0200

Adrien Destugues wrote:
> arfonzo is currently trying to improve Terminal compatibility with various 
> BBS. He noticed that the escape sequences for arrows are now ESC + O + 
> ABCD instead of the usual ANSI ESC + [ + ABCD.
> Is there a good reason it was changed this way ? As far as I can tell, ESC 
> + [ is the ANSI standard, and what I've seen used everywhere else.
> According to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html , ESC 
> + O selects level-3 shift for next character. I didn't know of it's use to 
> move the cursor around.
> It seems that the control sequences used to be the ANSI one until this 
> commit in 2008 :
> http://cgit.haiku-os.org/haiku/commit/src/apps/terminal/VTkeymap.h?id=a71fd7987b6eda68698e0b342afcd7890d2f4d86
> Is there any problem reverting to the ANSI escape code for moving cursor ?

IIRC the sequences we currently use were the ones various Linux terminals used 
at that time. Those seem to have changed back again. If you (or anyone else) 
changes them in Terminal, make sure to adjust/update termcap and friends as 

CU, Ingo

Other related posts: