Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!cs.mu.OZ.AU!summer From: summer@ee.mu.OZ.AU (Mark Summerfield) Subject: XTerm/Key code problems Message-ID: <9313210.1124@mulga.cs.mu.OZ.AU> Sender: news@cs.mu.OZ.AU Organization: Dept of Electrical & Electronic Engineering, University of Melbourne Date: Wed, 12 May 1993 00:36:55 GMT Lines: 38 I posted the other day with a problem with cursor movement in vi -- the arrow keys are not working. A couple of people replied with suggestions (for which I was grateful) but none worked. Further investigation has established that the problem seems to be with xterm and/or termcap. The arrow keys generate events correctly (tested with xev), but for some reason, xterm seems to be sending pc3 (console) style escape sequences instead of xterm (or vt100) ones, e.g.: Press: right arrow Sends: ^[[C Instead of: ^[OC Press: left arrow Sends: ^[[D Instead of: ^[OD etc.... This doesn't bother tcsh in the slightest for some reason, but it does bother vi. I'm also having problems in non-curses applications -- user input lines are not erased by ^U, for example. Running Kermit in an Xterm is fine (which is what I'm doing here) -- key codes reach the remote host correctly translated such that I can have the terminal type set to xterm, and it all works OK. The termcap entry for xterm on this host is standard (and identical to that on the 386bsd machine). I'm really confused about how all the key translations, tty operations and termcap features are supposed to work together. I can think of plenty of workarounds (changing my xterm termcap entry, changing the xterm key translations through the X resources), but I shouldn't have to do this. I just don't understand why it doesn't work! Thanks for any help, Mark. -------------------------------------------------------- Mark Summerfield, Photonics Research Laboratory Department of Electrical and Electronic Engineering, University of Melbourne ACSnet[AARN/Internet]: summer@ee.mu.oz[.au] -------------------------------------------------------- library, n., a place with a large number of people, a slightly larger number of books, and a very small number of photocopiers, of which at any given time at least 50% will be out of order.