tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: delete key funny character



On 2016-05-15 6:17 pm, Havard Eidnes wrote:
im having an isaue in xterm where the delete key shows ^? instead of
normal behavior.

If you have configured your setup so that the <-- key sends DEL, and
run NetBSD 7.0 or later, you'll want to avoid running "tset" in your
shell startup/login files.  Personally, I just commented out the "eval
`tset...`" line in my .login files on my upgraded-to-7.0 systems; this
seems to be the simplest way to avoid this lossage.


In the run-up to 7.0, "tset" was changed to ... umm ... apparently do
what it's been documented to do ~always, but apparently hasn't done up
until now.  It's now changed to read the "which key is 'delete'" from
terminfo, and change the tty settings accordingly.

Personally I'm frustrated by this change, since I'm running all my
desktops with "<-- sends DEL", and e.g. ssh transfers the already
existing local tty settings, and I've also set up my X11 environment
so that xterm sends DEL on the <-- key, and thus I really, Really
dislike having these settings overridden based on some seemingly
arbitrary (if not "wrong") and hard-to-override[1] terminfo settings
on a remote machine based on data in a database obviously maintained
by folks who are of the opposite persuation when it comes to what
character the <-- key should send.


[1]
It looks like terminfo has an "xterm+kbs" entry which from the
comments in the main terminfo file sounds like it can be overridden,
and according to terminfo(5) it looks like you can create
$HOME/.terminfo with the entry

# This fragment is for people who cannot agree on what the backspace key
# should send.
xterm+kbs|fragment for backspace key,
        kbs=^?,

and compile that with "tic -o .terminfo.cdb .terminfo", but
unfortunately, it makes zero difference -- tset still sets the tty's
Erase function to backspace.


How are one supposed to deal with this "properly"?

Regards,

- Håvard
Hi,
Thanks for all the input, along those lines I found a manual command that solves the issue:

    stty erase ^?

turns out it was my 'backspace' key that had the issue, my mistake, and stty -a showed erase as ^H, oddly the delete key did work for the kindof delete where it doesn't go back. the odd thing is that i found terminals where erase was set to ^H and there was no issue in that shell, but when there was an issue, resetting it to ^? fixed it.

~fire
fire%firecrow.com@localhost


Home | Main Index | Thread Index | Old Index