Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 1997 15:13:36 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        jlemon@americantv.com (Jonathan Lemon)
Cc:        imp@village.org, andrew@erlenstar.demon.co.uk, brian@awfulhak.demon.co.uk, brian@utell.co.uk, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Backspace = ^H
Message-ID:  <199703262213.PAA28870@phaeton.artisoft.com>
In-Reply-To: <19970326103943.36190@right.PCS> from "Jonathan Lemon" at Mar 26, 97 10:39:43 am

next in thread | previous in thread | raw e-mail | index | archive | help
> I agree.  I have a whole gaggle of real vt420s and vt220s around here
> (they are what we use on the sales floors) and when you press the "<X|" 
> key on these things, you will get a "^?" character.
> 
> This happens to be hardcoded into lots of our stupid Oracle Forms too.
> 
> So "^H" does _NOT_ do the right thing here, ASCII charts, and Terry's rants
> nonwithstanding.  Changing the defaults will just break everything again.


This is an idiotic premise.


***Here are the details on *why* it's idiotic:

You have VT420's and VT220's?  Then your /etc/ttys line for the port
on which the device lives should look like:


ttyd0	"/usr/libexec/getty std.9600"	vt220	on insecure
ttyd1	"/usr/libexec/getty std.9600"	vt420	on insecure
ttyd2	"/usr/libexec/getty std.9600"	vt420	on insecure
ttyd3	"/usr/libexec/getty std.9600"	vt320	on insecure

...


Then the tset will set the user's erase correctly; from the tset man
page:

    Once the termcap entry is retrieved, the window size, backspace, inter-
    rupt and line kill characters (among many other things) are set and the
    terminal and tab initialization strings are sent to the standard error
    output.  Finally, if the erase, interrupt and line kill characters have
    changed, or are not set to their default values, their values are dis-
    played to the standard error output.


In order, tset will (according to /usr/src/usr.bin/tset/set.c):

1)	Get the "kb" capability

2)	If there is no "kb" entry in the termcap, or the "kb" entry
	is not a single character, it will get the "bc" capability.

3)	If the "kb" entry is a single character, or, barring that, the
	"bc" entry is a single character, then the backspace character
	is set to the "kb" or "bc" entry, respectively.

4)	If the "kb" and "kc" entry are both either not present or
	consist of more than one character (only one character entries
	may be used for "erase"), then if the "bs" capability is present
	the backspace character is defined as control-H, otherwise it
	is defined as 0 (not set).

5)	If the backspace character is non-zero and the "os" capability
	is not present, then the erase character is set to the backspace
	character.

6)	If the backspace character is defined as 0 (not set) OR the
	"os" capability is present, then the erase characters is set
	to the manifest value "CERASE" (0177 in <sys/ttydefaults.h>).


***On termcap entries:

Note that pc3 (386BSD) and all the pcvt entries have the correct
"kb=\177" that would make them work.

Also note that cons25 has the correct "kb=^H", which would make it work.

The VTxxx termcaps, other than the 100, which has a backspace key,
all seem to be incorrectly derived from the 100 without unsetting "bs"
or with setting "os".



***Conclusion:

It seems that all that is troubling you is that your termcap is not
set up correctly and/or you are not using tset on login like you
are supposed to.



PS: if having correct settings bothers your Oracle forms, I'd look
to Oracle's possibly wanting "kb" or "kD".  Type "man 5 termcap"
for additional details.

If your termcap is correct and it's not obeying it, use pcvt, or
change your cons25 keymap in an /etc/rc.* and specify a modified
termcap entry for the cons25 to make Orcale happy.  Then contact
Oracle support and get them to fix their product (the suggested
workaround will continue to function after you obtain corrected
product).

					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703262213.PAA28870>