[comp.unix.xenix.sco] Non-destructive backspace

is@athena.cs.uga.edu ( Bob Stearns) (12/07/90)

I am using SCO-XENIX 2.3.2d with a Wyse-60 terminal. The terminal's backspace
is non-destructive, but my client wants it to be destructive. Is there any
simple way to modify termcap to achieve this result? I tried RTFM, and even
removed bs from the appropriate termcap entry, but it did not seem to work.
Any assistance or recommendations on where to read the manual gratefully 
accepted.

jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) (12/09/90)

In article <1990Dec6.190656.5866@athena.cs.uga.edu> is@athena.cs.uga.edu ( Bob Stearns) writes:
>I am using SCO-XENIX 2.3.2d with a Wyse-60 terminal. The terminal's backspace
>is non-destructive, but my client wants it to be destructive. Is there any
>simple way to modify termcap to achieve this result? I tried RTFM, and even
>removed bs from the appropriate termcap entry, but it did not seem to work.
>Any assistance or recommendations on where to read the manual gratefully 
>accepted.

Termcap is the wrong place to look for this problem.

The action of the backspace key is controlled by "stty".

Enter: stty erase "^H"

in your /etc/profile. Note: if you use vi, the sequence will be
			    stty erase "^V^H"

-- 
-------------------------------------------------------------
Jay @ SAC-UNIX, Sacramento, Ca.   UUCP=...pacbell!sactoh0!jak
If something is worth doing, it's worth doing correctly.

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (12/09/90)

In article <4443@sactoh0.SAC.CA.US> jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) writes:

| Termcap is the wrong place to look for this problem.
| 
| The action of the backspace key is controlled by "stty".
| 
| Enter: stty erase "^H"
| 
| in your /etc/profile. Note: if you use vi, the sequence will be
| 			    stty erase "^V^H"

  Not a good way to do it, with the control character embedded. Instead
the following may be used, which also avoids a problem with use of ^ in
sh.

	stty erase '\^H' echoe
                    ^^^  ^^^^^
                     |     |_ this forces the character to be erased
                     |_______ three characters, *not* cntl-H

  I think the key is the need for echoe.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me

jeff@answer.UUCP (Jeffrey E. Finucane) (12/10/90)

In article <4443@sactoh0.SAC.CA.US> jak@sactoh0.SAC.CA.US (Jay A. Konigsberg) writes:
>In article <1990Dec6.190656.5866@athena.cs.uga.edu> is@athena.cs.uga.edu ( Bob Stearns) writes:
>>I am using SCO-XENIX 2.3.2d with a Wyse-60 terminal. The terminal's backspace
>>is non-destructive, but my client wants it to be destructive. Is there any
>>simple way to modify termcap to achieve this result?
>
>Termcap is the wrong place to look for this problem.
>
>The action of the backspace key is controlled by "stty".
>
>Enter: stty erase "^H"  ...
>
   I think, perhaps, the wrong problem is being addressed.

   On a wyse-60 out-of-the-box the backspace key and left arrow key both
produce a ctrl-H.  I like to configure the wy60 to produce a ctrl-B when
the left arrow is pressed and then set up the termcap to deal with each.

  On the wyse-60, enter setup, go to f-keys, and press ctrl-left-arrow.
Type in a suitable character (such as ctrl-B) for both the shifted and 
unshifted versions, and save the setup.

  The entry for the wyse in termcap should then include "kl=^B" and perhaps
"kb=^H"   The latter should not be necessary.

  I hope this helps.


     Jeff

-- 

Jeffrey E. Finucane     Custom Tailored Systems     nshore!answer!jeff
Data Phone: (216) 935-2712  Telebit Trailblazer  Voice: (216) 935-0252

mike@bria.AIX (Mike Stefanik/78125) (12/30/90)

In article <2547@sixhub.UUCP>, davidsen@sixhub.UUCP (Wm E. Davidsen Jr) writes:
>   Not a good way to do it, with the control character embedded. Instead
> the following may be used, which also avoids a problem with use of ^ in
> sh.
> 	stty erase '\^H' echoe
>   I think the key is the need for echoe.

Actually, the command that was specified (ie: stty erase "^H") is perfectly
fine; the above command will NOT work, however, because of single-quoting
and escaping the carat -- stty will scream about that one.

However, why put this in /etc/profile?  To echo backspace, simply put ECHOE
in /etc/gettydefs.  For example, for a 9600 bps terminal, you could use:

m # B9600 HUPCL # B9600 CS8 SANE HUPCL TAB3 ECHOE IXANY # \r\nlogin: # m
                                            -----
The "m" is specified in /etc/ttys, and is used to define line behaviour
when logging in.  Including an ECHOE causes erase to be echoed.

-----------------------------------------------------------------------------
Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation
UUCP: ...!uunet!bria!mike
"If it was hard to code, it should be harder to use!"