Subject: Re: i386 xterm key bindings
To: None <current-users@netbsd.org, port-i386@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: port-i386
Date: 07/04/2000 01:55:46
[ On Monday, July 3, 2000 at 21:23:53 (-0700), Jonathan Stone wrote: ]
> Subject: Re: i386 xterm key bindings
>
> I think we have violently disagreeing opinion on what constitutes
> "sane". I have used DEC VT-52 clones, VT-100 clones (and a vt102),
> and vt-220s. I'm *used* to the delete-to-left key being ASCII DEL.
Ah OK..... well, to each his own! ;-)
Don't forget though that the VT52 and VT100 (and VT101 and the
decwriter-III and other similar keyboards) had both a normal backspace
key *and* the delete key in approximately the "correct" places, so from
a layout perspective there's no real preference on those physical
models.
> What I'm *trying* to do is to set up al lthe mappings to approximate a
> vt-220 style approach. Since that's exactly what I have on all my
> pmaxes, and it's what NetBSD used, more-or-less, to support.
I think it should work the vt220-way by default if my experience is
anything to go by, though as I say I've not yet run X11 on the console
either with or without my wsconsctl tweaks in place.
In the 1.3 days I'd hacked pcvt to have the backspace key generate an
ASCII BS but I never ran X11 on the console much....
> hat is *precisely* what i'm trying to fix; it's what the current setup
> does once I rlogin to my netbsd-1.4 box, or to a SunOS box. Except
> that I have DEL mapped to the key labelled "backspace".
>
> I want to set up x keybindings that are vt100/vt220-like.
> Then, everything pretty much Just Works. Or at least, it used to, up
> until the current batch of changes.
Hmmm... OK, interesting.
what is happening then?
> Historically, the VT series *was* the standard. It's PC keyboards
> which were/are incompatible :).
Just to pick nits, no, it was DEC which was incompatible in using "DEL"
as the delete-to-the-left key -- almost all other ASCII terminals and
users and software used ASCII BS for that purpose. DEC made life very
difficult for Unix users when the VT220 came along by putting the key
that generates ASCII BS way out of the way and leaving only one larger
key anonymously labeled with a "<--" icon in its former position that
unceremoniously followed their software convention by generating an
ASCII DEL. Unix users who either never used VT220s or their faithful
clones were able to keep using ASCII BS as the delete-to-the-left key
(and to continue to use the TTY "rubout", aka ASCII DEL key for "stty
intr").
> >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
>
> No, I don't. I get the Esc-[-3-~ braindamage. That's not a
> `proper' keybinding: it should be ASCII DEL.
You can fix that -- you just have to learn the xmodmap tricks! ;-)
> I thought real VT100s also had a DEL key where PeeCees have backspace?
Well, no, not really -- it has both in "convenient" locations though all
VT100 users I knew liked "Back Space" as the "delete-to-the- left" key:
http://vt100.net/docs/vt100-ug/figure3-2.html
Use of either key often resulted in accidental hits of th BREAK key
though -- the rate of such accidents depending on your skills as a touch
typist using those not-so-ergonomic keys.....
It's similar on the VT52 though the "DELETE" is slightly better
positioned because more frequent use of it by a touch typist is less
likely to result in accidental hits of the "BREAK" key which is squished
in a little too close to the small "BACK SPACE" key:
http://vt100.net/docs/vt52-mm/figure3-1.html
Luckily I never used a real VT52 for much (though I still have a working
one for my PDP-11 and I did use it as a sun-3 console briefly!).
The best keyboard ever for plain old Unix use though is the one on the
AT&T DMD-5620! ;-)
> What, if anything, does the wscons binding have to do with how
> X handles keycodes? Do the keycodes as seen by the Xserver
> go through wscons' mapping?
I would hope it has everything to do with how the Xserver picks up its
default keycode mappings, but it may not given the heritage of the
Xserver on i386.
> And that still doesn't explain how I can get the "Delete" keysym
> to generate ASCII DEL. Now, *that* is just broken.
I noticed in 1.5A/i386 that the 'Del' key on the cursor keypad didn't
generate an ASCII DEL under wscons any more, but the "BackSpace" key
did, as did the other 'Del' key on the numeric keypad (at least when
NumLock was off). As I say I fixed the "BackSpace" key to my
preferences, but I don't think I've fixed the cursor keypad 'Del' yet.
In any case if the right X11 keycode results in a "Delete" keysym
(0xffff) then most X11 applications, including Xterm *should* translate
that into an ASCII DEL code. If that doesn't happen then someone
certainly did screw something up!
Have you tried running "xev" to see what keysym is being generated when
you press the key you think should generate "Delete"?
You should see something like this for a single keypress (these key
codes from a sun type-4 keyboard):
KeyPress event, serial 19, synthetic NO, window 0x6400001,
root 0x24, subw 0x0, time 615507251, (53,106), root:(1224,521),
state 0x0, keycode 73 (keysym 0xffff, Delete), same_screen YES,
XLookupString gives 1 characters: ""
KeyRelease event, serial 19, synthetic NO, window 0x6400001,
root 0x24, subw 0x0, time 615507481, (53,106), root:(1224,521),
state 0x0, keycode 73 (keysym 0xffff, Delete), same_screen YES,
XLookupString gives 1 characters: ""
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>