Subject: Re: Backspace in xterm doesn't work anymore
To: NetBSD current-users mailing list <current-users@netbsd.org>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: current-users
Date: 06/14/2000 16:04:11
> > After building the world and also building and installing X from 
> > sources of June 9, the backspace key on my (Apple USB) keyboard 
> > generates ~. ctrl-H works alright though, and backspace seems to work 
> > OK in for example xemacs. Clues, anyone? This is on a macppc machine.
> 
> You need to set the XTerm.vt100.deleteIsDEL X resource to true (see
> xrdb if you don't know how to do this).
 ...
> (Yup, I think this is stupid.)

Depends on your point of view.  I side with you, but the spec. implies that
the 'Delete' key is the opposite of the 'Insert' key, and not the 'Del' key
[#].  Thus, the new xterm terminfo/termcap has this as sending '\E[3~'.  If
you have a PC-style keyboard (or new Sun, or ...) this is probably OK.  If
not, adapt.  Anyway, having said that, previous xterm definitions had the
delete key as sending '\177' and, in order to keep compatibility, I changed
our entry to have '\177' in r1.62 of .../share/termcap/termcap.src.  Diff
appended.

J

[#] The SUSv2 spec. actually calls this the 'Remove character' key.
    These names may not coincide with the labels on /your/ keyboard ...
-- 
                    My other computer also runs NetBSD
                          http://www.netbsd.org/

 ---8<---------------------------- Cut here ---------------------------->8---

Index: sharesrc/share/termcap/termcap.src
diff -c sharesrc/share/termcap/termcap.src:1.61 sharesrc/share/termcap/termcap.src:1.62
*** sharesrc/share/termcap/termcap.src:1.61	Thu May 11 23:44:34 2000
--- sharesrc/share/termcap/termcap.src	Thu Jun  8 14:02:49 2000
***************
*** 1,4 ****
! #	$NetBSD: termcap.src,v 1.61 2000/05/12 06:44:34 jdc Exp $
  #
  ######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
  #
--- 1,4 ----
! #	$NetBSD: termcap.src,v 1.62 2000/06/08 21:02:49 jdc Exp $
  #
  ######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
  #
***************
*** 1745,1753 ****
  	:am:bs:km:mi:ms:ut:xn:\
  	:Co#8:co#80:it#8:li#24:pa#64:\
  	:AB=\E[4%dm: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