DELETE/BACKSPACE key paradox on RS/6000

Tolliver J S jxt at cpdws1.ctd.ornl.gov
Fri Mar 15 03:30:58 AEST 1991


Hi!
This is being cross-posted to comp.unix.questions. First a small introduction.

A few weeks ago, I started a flurry of comments about the
delete/backspace keys and
an RS/6000. The problem was that I claimed that the delete key on my
VT100
teminal emulator wasn't being interpreted "correctly" by AIX and I
wanted to
change it, preferably with the vt100 terminfo entry instead of stty.

It seems that the concensus opinion is that AIX is right and I am
wrong, that real VT100's have both backspace and delete keys, that I should
be using the correct key for the purpose intended, and that my terminal
emulator should either include both keys or allow the delete key to be
remapped to a backspace. Furthermore, if my terminal emulator does not have
both keys and/or allow remapping, then it is brain-dead. And perhaps I, too,
am brain-dead for using such a terminal emulator.

Now for some explanations. It is true that VT100's have both keys. My terminal
emulator also supports both. It also supports remapping of the delete key to
be DELETE or BACKSPACE or anything else I want it to be. So maybe it's only
me that is brain-dead :-)

The problem is that the key marked delete on my keyboard is in the convenient
location for (all-to-frequent) use and that getting to the backspace key is
cumbersome. So why not just remap the delete key to send BACKSPACE? Well, I
use the same keyboard and terminal emulator to connect to a variety of
machines, most of which use DELETE for the erase function. Here's a list:

erase is DELETE		erase is BACKSPACE
---------------		------------------
Dec Ultrix		IBM AIX 3.1
SUN			Silicon Graphics IRIS
Intel Hypercube
Apple AU/X
NeXT
Cray UNICOS
Cray CTSS
VAX/VMS
DEC TOPS-10

I don't claim that this list is exhaustive, just the systems I regularly use
and/or have access to and have tried. I'm sure many of the readers of this
newsgroup could add to either list.

In any case, I don't want to remap my delete key between each rlogin, etc. So
I want to leave the delete key as DELETE and tell AIX to use DELETE as erase.
And that is easy to do with stty in my .profile, along with appropriate logic
to decide if I am at the console or at a remote VT100 or emulator.

However, as a fledgling system administrator, I receive all the complaints from
neophyte unix users who can't understand why delete doesn't delete. You see,
almost every other system in use at this site uses delete to delete (er,
excuse me, erase) and that is what people expect. To solve this dilema, I COULD
tell everyone to put something like [ $TERM = vt100 ] && stty erase ^? in their
.profile or .login file, but I would prefer a system-wide way of handling it
instead of each user doing it on an individual basis. Of course, at the console
keyboard, I need erase to be BACKSPACE so I can't really do it system-wide
(even if that would be possible). That is why I hit upon the apparently
bad idea of mucking with the vt100 terminfo database to change the behavior
of the delete key.

So now my question is this:
Is the best way of handling this DELETE/BACKSPACE identity crisis with a
stty in everyone's .profile or .login?
Or is there some system-wide method, possibly using terminfo, that would work
and apply to everyone except console logins?

Please note, the problem sometimes seems to get much worse. For example,
logged into a SUN, delete works normally (i.e., it erases), then rlogin to
the RS/6000 passes through .login, which does stty erase ^?, and delete
still works "normally". But then doing an xterm or aixterm grandly messes
up the delete key. It now echoes multiple characters--escape-something-or-
other. Furthermore stty erase <del>, where <del> is the delete key doesn't
help since stty erase is looking for a single character. In fact, I think
this will set the erase character to be escape, but certainly not the delete
key. Go back to the SUN and do an rsh to the RS/6000 and start xterm or
aixterm. The rsh doesn't go through .login; delete still echoes multiple
characters and stty erase doesn't work. Or, from a Macintosh running MacX,
connect to the RS/6000 (which MacX does via rsh), and delete still echoes
multiple characters.

Second question: Is there anyway to fix THAT? Is this an aixterm problem? It
seems that the key-mapping gets done at some lower level even before .login
and grandly messes up the delete key. Note that MacX to a SUN, Ultrix, etc.
works just fine.
--
Many thanks,
Johnny Tolliver (jxt at ornl.gov)



More information about the Comp.unix.aix mailing list