Date: Thu, 1 Mar 2001 10:03:08 +0100 From: "Meino de Graaf" <mgraaf@csc.com> To: questions@FreeBsd.org Cc: stable@FreeBsd.org Subject: Re: strangeness with xterm Message-ID: <OF70AEEB33.14E4F3E4-ONC1256A02.0031B9FD@eu.csc.com>
next in thread | raw e-mail | index | archive | help
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. So I also never use these special functions in vi and use the hjkl keys for navigation. Meino de Graaf CSC Integrated Payments ---------------------- Forwarded by Meino de Graaf/BEN/CSC on 03/01/2001 10:04 AM --------------------------- Marius <marius@mail.communityconnect.com>@FreeBSD.ORG on 02/28/2001 07:16:57 PM Sent by: owner-freebsd-stable@FreeBSD.ORG To: questions@FreeBSD.org cc: stable@freeBSD.org Subject: Re: strangeness with xterm I get this behavior when I am using ssh from my FreeBSD box to our Sun servers. It 'feels' like when I am using the arrow keys to move around quickly that somethings gets mangled and the wrong key sequence gets played out as my input. I can usually use my arrow keys in vi, but when I try to scroll up or down very quickly, I can consistantly reproduce this error. Jumping to one of our production linux/BSD boxes behind the Sun server and vi works consitantly. I assumed it was some kind of terminal setting incompatability that could be rooted out, but again that is just a whim. I mainly just force myself to use the hjkl keys... -------------------- Marius Community Connect Inc On Wed, 28 Feb 2001, Kal Torak wrote: > Lanny Baron wrote: > > > > Hello Fellow FreeBSD'ers, > > Since an installation or rather an upgrade to 4.2-STABLE, I have been > > encountering problems with X using xterm's. The problem demonstrates itself > > when editing files with vi and even when installing apps like mod_php4. It > > seems to be linked to the up and down scrolling keys. When scrolling up, many > > times vi goes into insert mode and puts in an A and when scrolling down, it > > will put in B's and C's. Addtiionally, the number pad keys will not input > > numbers but rather letters. > > > > Has anyone else had this problem? Would anyone know how to correct the > > symptom? > > > It has something to do with how the xterm is interpreting those keys... > You get the same sort of behavior when telneting from windows etc. > > The shell understands them but not vi and others... I would like to > know how to correct this as well... > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-stable" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message 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?OF70AEEB33.14E4F3E4-ONC1256A02.0031B9FD>