Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2001 20:18:53 +1100
From:      Kal Torak <kaltorak@quake.com.au>
To:        Meino de Graaf <mgraaf@csc.com>
Cc:        questions@FreeBsd.org, stable@FreeBsd.org
Subject:   Re: strangeness with xterm
Message-ID:  <3A9E13FD.8BBBFAE0@quake.com.au>
References:  <OF70AEEB33.14E4F3E4-ONC1256A02.0031B9FD@eu.csc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Meino de Graaf wrote:
> 
> This is not a new or strange behavior. As long I have worked with UNIX
> boxes (early 80s) this behavior has been present in UNIX systems. BTW it is
> not related to xterm. When I used VT100 terminals on serial lines, this
> behavior existed already.
> 
> The deeper cause of this behavior has to do with the following:
> 
> -    Special keys (function keys, arrows etc) generate a sequence of
> characters, FE an arrow up generates esc[A.
> -    The communication (Serial or TCP/IP) is character based, so the above
> mentioned character sequence does not arive as a single packet.
> -    The kernel delivers all the characters it has available at the moment
> a process does a read on a tty file descriptor. This means that if the
> above sequence is not yet fully received, the kernel will deliver what it
> has, say the esc had already arrived, so curses (what vi uses) receives an
> escape character without the following two characters.
> -    Curses tries to match the received data with its termio or termcap
> files and when found it returns that function. If no matching capability is
> found it passes the read data (the esc) unmodified to the process (vi).
> Therefore if due to timing the above sequence got split up, vi will receive
> first a standalone esc character followed by the '[' & 'A' character.

That makes sense and all.. But is there anyway to fix it?
Because I have never had this problem with FreeBSD telnet, only
with windows... Also it seems to happen more on my local network than
when connecting to a remote network, very strange since it should be
faster and therefore get all the characters?

Also I have only ever noticed this with vi... Shells like bash etc, seem
to get the characters perfectly...

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A9E13FD.8BBBFAE0>