Subject: Re: 2.0 broke the delete key, but only in X11
To: Dieter <netbsd@sopwith.solgatos.com>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: netbsd-help
Date: 02/12/2005 15:20:34
> > > In 1.6.2 the control-H key generates ^H,
> > > the "backspace" key generates ^H, and the
> > > "delete" key generates the delete character,
> > > just like you might expect.
> > 
> > Why do you expect that?
> 
> Because
> 
> 	a) That is the correct behavior.

From all the information I have available, it isn't.

> 	b) As far as I can recall, that is how every terminal I've ever
> 	   used worked.

On my DEC VT510 with a PC keyboard both backspace and delete keys generate
delete.

> > I don't have a VT220 terminal currently, but I
> > believe that on such terminals Backspace generated delete and Delete
> > generated ^[[3~.
> 
> I don't recall having ever used a DEC VT220, but if the backspace key
> generated delete and the delete key generated ^[[3~ then someone screwed up.

According to the Linux BackspaceDelete HOWTO, the Linux console generates
delete when Backspace is pressed, because that's what a VT100 did. The
Xterm FAQ has the same explanation for Xterm behaviour.

> > And xterm is a VT220 emulator,
> 
> The default is VT100, not VT220.  I don't see a kD entry in the VT100
> termcap.  I don't see ^[[3~ in the VT100 termcap.  I don't recall any

OK, if there is no kD entry in the VT100 termcap and xterm should
(according to you) emulate a VT100, the only correct thing to do when a
Delete key is pressed would be to ignore it, no?

> screwiness with the delete key on the actual DEC VT100, although it has
> been a long time since I used one.

Please see http://www.invisible-island.net/xterm/xterm.faq.html#xterm_erase

Especially the phrase: "Since xterm is emulating a VT100/VT220, the
backarrow key should generate a 127 (often displayed as ^?)."

> > > Question 1: How do I get the delete key to work correctly in X11 in
> > 2.0?

Your question should be IMHO formulated as "How do I get the delete key to
work as I _want_ in X11". I don't really care about making the Delete key
send delete when the correct sequence is ^[[3~, but if you remain
unconvinced, I think the FAQ mentioned above will help you.

(In fact, I don't really care what does those key send. As long as the key
produces the desired effect (delete the character under the cursor without
moving the cursor), I'm happy.)

Bye	Pavel