[haiku] Re: Nonstandard CSI code?

  • From: Pete Goodeve <pete.goodeve@xxxxxxxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Mon, 1 Jul 2013 19:00:17 -0700

On Tue, Jul 02, 2013 at 12:37:24AM +0200, Ingo Weinhold wrote:
> On 07/02/2013 12:05 AM, pete.goodeve@xxxxxxxxxxxx wrote:
> >I'm wondering why Haiku seems to use Control Sequence Introducer characters
> >that I can't find (currently) used by any other system.  I was trying to
> >use a Perl app, suggested to me by someone, that expects arrow-key commands
> >in the usual form "<esc>[A", or whatever.  It doesn't work, because it 
> >turns
> >out the sequence provided by Haiku is "<esc>OA"!
> 
> When I cleaned up the escape sequence handling several years ago, the 
> sequence we're using now was actually being used by openSUSE -- don't 
> know about other distributions. Apparently it isn't anymore (in 12.3). I 
> don't know the reasoning why it was nor why it has been changed back.
>

Accidental...? (:-/)
Seems to me that sticking to ANSI would be an extremely good idea.
Unless someone has a good reason otherwise, I'll file a ticket.

> Anyway, if a program hard-codes an escape sequence, it is bound not to 
> work somewhere. The whole termcap/terminfo mess exists to "solve" the 
> problem.

True, but if it codes ANSI, and the OS supplies ANSI...
Otherwise it has to find some way to get the info, and neither libtermcap nor
libterminfo appears to be available by default in Haiku.
(I'm not actually very familiar with Perl, so I don't know if it has a module 
for that.
In the present case, a quick patch to the relevant perl app brought 
compatibility.)
> 
> 
> >
> >Furthermore, I can't figure out where the sequence is actually being
> >generated from the B_UP_ARROW, etc., codes from the keymap.  I assumed
> >that /etc/termcap was in control, [....]
> 
> The Terminal generates the sequences and it doesn't care (and cannot 
> even know) what value you set the TERM variable in your shell to. The 
> Terminal sets TERM so the programs controlled by the terminal can know 
> what type of terminal they are dealing with and can -- via 
> termcap/terminfo -- communicate correctly with it.

Thanks.  i'm now beginning to get my cause and effect straight! (:-))

        -- Pete --

Other related posts: