Subject: Re: Backspace vs Delete on Console in 1.5.3
To: None <port-i386@netbsd.org>
From: Jonathan Perkin <sketch@rd.bbc.co.uk>
List: port-i386
Date: 09/06/2002 12:00:14
This has always been one of my pet-hates on UNIX, and while I've
pretty much got every app configured to DTRT, I'd still like to
get to the bottom of the issue.

According to Thomas Dickey (who's probably one of the more clued
people on the matter) on his xterm faq page at
http://invisible-island.net/xterm/xterm.faq.html#xterm_xmodmap

	The underlying problem is that we've accumulated three
	things that are being equated as "Delete":

		ASCII backspace (code 8)
		ASCII delete (code 127)
		VT220 "remove" aka "delete" (ESC [ 3 ~)

So it seems to me that the best solution would be for "standard"
PC keyboards to produce ^? for the "Del" key, and ^H for the
backspace key (or maybe I just don't get it).

Now, looking at implementing that across the board on the systems
I use, I come across a problem when it comes to NetBSD which I
don't really understand.  It seems to be the only unix out of the
ones I use that generates a ^? as default for the backspace key in
the console.  Tracking this down has made me even more confused:

 o The vt220 termcap entry has "kb=^H".  This means that the "delete
   character to the left" sequence is ^H, no?
 o /etc/gettytab lists "er" (erase character) as ^? by default.  Does
   this not conflict with the above?
 o wskbdmap_mfii.c has KS_Delete for both keychar 14 and 211.  I
   presume these correspond to backspace and delete respectively, in
   which case is there not a KS_BackSpace?

Which part of the above is the thing which means the backspace key
on my PC keyboard sends ^? as default in a root csh on the console?
And is that for me to fix in my .cshrc (I hate having non-standard
config files) or is this an issue which needs fixing within src/ ?
I'd like to settle for ^H for backspace, ^? for delete, then work
up from there configuring all my applications (unless someone can
enlighten me on a better solution (^H *or* ^? for backspace, ^[[3~
for delete - but that seems broken to me, why use ^[[3~ at all).

Thanks,

-- 
Jonathan Perkin - BBC Internet Services - http://support.bbc.co.uk/
    Please check email headers for any relevant contact details