Subject: Found a workaround to: Re: 2.0 broke the delete key, but only in X11
To: None <netbsd-help@netbsd.org>
From: Dieter <netbsd@sopwith.solgatos.com>
List: netbsd-help
Date: 02/15/2005 09:32:20
> 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.
> 
> In 2.0 these keys continue to work properly
> on the serial console, but on an X terminal
> the delete key is now generating some ^[[3~
> screwiness.
> 
> xev says:
> 
>     XLookupString gives 1 bytes: (7f) "_"
> 
> So xev is getting the correct value (7f), but other programs
> are getting the ^[[3~ screwiness.
> 
> PR 27256 implies that one can get the correct behavior with
> something called "deleteIsDEL", but I grepped the man pages
> for "deleteIsDEL" and got nothing.

1.6.2 doesn't seem to have the source to the xterm(1) man page,
and the string "deleteIsDEL" doesn't appear to occur in the
roffed version in 1.6.2.

2.0 does have the source to xterm(1) and I did manage to find
"deleteIsDEL" there.  A hassle to find it in the roffed version
since it only occurs in bold, so you have to:

cat -v xterm.0 | grep 'd\^Hde\^Hel\^Hle\^Het\^Hte\^HeI\^HIs\^HsD\^HDE\^HEL\^HL'

Ugh.  No wonder I didn't find it before.

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

Adding

XTerm.vt100.deleteIsDEL: true

to ~/.Xresources seems to be working. (knock on wood)

Now I just need to find a global version of ~/.Xresources so
every user doesn't have to edit ~/.Xresources.  Someday
I'll be able to run 2.0.  Maybe before 2.1 comes out.