Subject: Re: i386 xterm key bindings
To: None <,>
From: Greg A. Woods <>
List: current-users
Date: 07/04/2000 00:05:09
[ On Monday, July 3, 2000 at 19:35:06 (-0700), Jonathan Stone wrote: ]
> Subject: Re: i386 xterm key bindings 
> The point which nobody seems able to answer is:
>   ``how do I make the delete-left key generate ASCII DEL''?

What I do is make the DELETE key generate ASCII DEL, and the BACKSPACE
key generate ASCII BS (just as on my Sun type-4 keyboard in native
SunOS, and as on most sane real terminals, the totally *insanse* DEC
VT220 series aside).

Then things fall together relatively quickly, except for emacs users
such as myself who need a bit of glue for their ~/.emacs so that
BACKSPACE doesn't do what HELP should/does do.  Being an orthogonal kind
of guy I generally go one step further in emacs (and similar interfaces)
and bind "DELETE" to delete the character in front of the mark
(i.e. under the cursor), just like Ctrl-D does.

Now of course if you want to go the other way around and follow the
VT220 down the path of incompatible insanity, as it seems you've
indicated, then you should be able to do pretty much the opposite of
what I do, or rather do almost nothing since that's the default wscons
configuration, and be equally happy!  ;-)

> At least over an rlogin or telnet session?  It looks to me as if
> someone designed a kludge that works for X, but simply didn't think
> about interoperating over Telnet/rlogin streams, or non-X screen-aware
> apps run in an xterm.

I'm not sure exactly what you mean -- if you re-bind the keys with
xmodmap (eg. with something generated by pgksrc/x11/xkeycaps) then
you'll get the proper bindings in xterm and thus in any [rs]login or
telnet session you open from any xterm.  Besides my diskless Sun sparc
workstations running X11 I also have some NCD X terminals and they by
default have the naughty VT220 style keyboards.  I re-map their
keyboards in /etc/X11/xdm/Xsetup with an xkeycaps designed file (and
of course I re-label the keycaps which indelible marker) and the only
problem I've had is with Netscape not accepting one of the remappings
for '~'.  The key that's in the position of the BACKSPACE key generates
an ASCII BS key in an xterm and all is well....

I've not yet run X11 with my wscons fix in place, so I don't know if
it's 100% perfect yet, i.e. whether or not the X server will pick up the
default keyboard mapping from wscons, but it better be!  ;-)

> If the current setup doesn't acutally support that, then I propose we
> back out the keybinding changes to xterm, and submit a pullup request
> to do the same in 1.5.   At least until someone fixes the current bugs.

I'd strongly suggest that if "emul=vt100" in /etc/wscons.conf then the
keyboard map should match a real VT100, and only if it's "vt220" should
the keyboard map by default do the stupid "BACKSPACE=DEL" nonsense that
the damn vt220 line of terminals have perpetuated.

I'll be *extremely* upset if the default bindings of anything
(i.e. xterm or the console or whatever) change on NetBSD/sparc!

							Greg A. Woods

+1 416 218-0098      VE3TCP      <>      <robohack!woods>
Planix, Inc. <>; Secrets of the Weird <>