From: martinr@cardix.mpi-stuttgart.mpg.de (Martin Rosenbauer)
Newsgroups: comp.sys.hp
Subject: Re: HPUX and the backspace key
Date: 13 Dec 1992 11:31:24 GMT
Organization: Max-Planck-Institut fuer Festkoerperforschung, Stuttgart, Germany
Distribution: world
NNTP-Posting-Host: cardix.mpi-stuttgart.mpg.de

In article <1992Dec8.154207.5201@cognos.com>, jimp@cognos.COM (Jim Patterson) writes:
|> jmuscat@nexus.yorku.ca (John Muscat) writes:
|> : I have a trivial problem which I hope has a trivial sol'n. When telnetting to 
|> : our a new HPUX 730 host from another vendor machine (eg Dec, Next or a PC 
|> : running with tcp/ip sw) the backspace key gives a ^? (versus erasing
|> : an going back one character).
|> : ... I've played around
|> : with the tset and stty commands but I haven't found the bit of magic that 
|> : remaps CRTL-H to the key labelled backspace. 
|> :
|> : Does anyone know how to do the mapping of erase to the backspace key?
|> 
|> I think you're going about things the wrong way. You don't want to
|> map BACKSPACE to ^H, but rather map what BACKSPACE sends (i.e. ^?)
|> to the stty 'erase' function. Try this:
|> 
|>    stty erase ^?
|> 
|> If you want to do this in your .login file, it's not a bad plan to
|> base this on what 'term' gets set to, e.g.
|> 
|>   stty erase ^?
|>   if ( `expr $TERM : 'hp23*'` ) stty erase ^H
|> 
|> --
|> Jim Patterson                  Cognos Incorporated
|> Sr Consulting Engineer         P.O. BOX 9707
|> UUNET:jimp@cognos.COM          3755 Riverside Drive
|> PHONE:(613)738-1338 x3385      Ottawa, Ont  K1G 3Z4

We went a different way of solving this problem:
Whenever we have this problem, it's a vtxxx terminal, usually
a vt100 emulated on a PC, or a DEC vt terminal. We could not
change the DEL-Key into a backspace key on these terminals since
people still want to login into vaxes running VMS and there they
really need a DEL-Key.

What I did was changing the vtxxx files stored in /usr/lib/terminfo.
I wrote a few small scripts, 'untic'ing the vt files in the
/usr/lib/terminfo/v directory, changing the backspace information
into DEL (using sed), 'tic'ing them and restoring  them.
Logging in I always set something like
stty erase $(/usr/bin/tput kbs) (in our standard .kshrc file/.profile.)
which sets the erase to whatever is stored in the data base
and the problem is solved.

Since we are using many different terminals at many different
systems, this seemed to be the appropriate way of doing it. I hate it
making people type 'stty erase ^?' and the like. I also hate it
making people set there terminal type by hand. It's nice that
all newer telnet/telnetd communications support passing the
terminal type now.

When logging in from a vax, in our case, the terminal type is set to
'dec-vt300' and the like. Very very strange. But a symbolic link in
the /usr/lib/terminfo/d directory to vt300 helps.

BUGS: The only thing not coverer here is: Using a DEC X-terminal
      with usual xterm windows. The keyboard there seems to send
      DEL too. Probably one should just make these xterms indentify
      themselves with something like dec-xterm and provide an
      appropriate entry in /usr/lib/terminfo/d .

If anyone found a different solution, please e-mail me. I am very
interested in this stuff.
-- 
========================================================================
Martin Rosenbauer                   martinr@cardix.mpi-stuttgart.mpg.de
Max-Planck-Institut FKF      __o    Telephon: +49 (711) 686-0679
Heisenbergstr. 1           _-\<,_   (privat : +49 (711) 694-924)
W-7000 Stuttgart 80   ....(_)/ (_)  Fax:      +49 (711) 678-7934
==== Germany ===========================================================
From: perry@hpfcmgw.FC.HP.COM (Perry Scott)
Date: Tue, 15 Dec 1992 01:01:43 GMT
Subject: Re: When will HP supply PATCHES before they are Required?
Organization: HP Fort Collins, CO