Del & Backspace Key - Linux Termcap
Brian K. White
brian at aljex.com
Sat Oct 10 22:25:24 PDT 2009
Tom Aldridge wrote:
> Clarification. Without using SCO emulation but instead linux.
>
> Tom
>
>
> Tom Aldridge wrote:
>
>> OK, here's a whole nuther can of worms.
>>
>> Can anyone give me some direction on getting the delete key to act like
>> cancel as in "Del-Cancel" like SCO emulation did?
>> ... and Backspace to move left one character?
>>
>> While I have the xterm issue resolved for people running linux desktops,
>> I have others running Putty or Zoc.
>>
>> Tom
>>
>>
Internally conflicting specs.
The break key is a stty setting, and can only be a single byte.
Linux and xterm terminals emit a multi-byte sequence for the Del key.
So, if you want Del to be the break key, you must do two things:
* Use a terminal that emits a single byte from the Del key
* Specify that key as the break key via "stty intr 'that_byte'", I
suggest in /etc/profile in response to detecting some value for $TERM
If you want to take xterm or linux as a starting point and mangle your
terminal into emitting a single byte from the Del key, well then your
terminal no longer emulates xterm or linux, and you should no longer
_call_ it xterm or linux but instead make up some new name and put that
in $TERM and in /etc/termcap, the terminfo database, and fp/termcap.
I say terminal intentionally to include all forms of terminal, of which
emulators are only part. The real linux console is also a terminal.
xterm in an X session on the console is a terminal, and of course the
windows terminal emulators are terminals. ssh from box a to box b is not
a terminal, only whatever you used to log into box a is. Some terminals
are easy to modify, some are not, So if you go the route of hacking some
existing terminal to misbehave, well you just grant yourself some amount
of grief forever after since you stuff will always be broken wrt
everything else in that respect.
I think that's unnecessary and silly myself. Just use scoansi or some
other existing emulation. As long as your termcap and terminfo
accurately define your terminal, who cares what that terminal is
called?(*) Or just use linux/xeterm and use ctrl-c. It's a dumb thing to
care about and waste time on trying to fight.
--
bkw
(*) one reason, on linux, some software just unfortunately isn't as
terminal agnostic as it's supposed to be. Even with a good accurate
scoansi definition in termcap and terminfo, and a good accurate scoansi
emulator, vi and ls will often screw up the screen by setting unintended
colors. You are left with a screen that's dark red or dark blue on
black, although most apps do work fine.
And really, the fix here is probably just to figure out what it is about
the scoansi definitions that differs from all the other perfectly
working definitions. I don't believe scoansi emulation can't work
perfectly, just that no one has bothered to track down the glitch.
I know what it would take, but, I subscribe to the paragraph above and
don't actually have any problem.
I have users that used our app on sco for years, and so want their
interface to stay the same despite having moved to a different server.
For end users, if it's possible to arrange, I think it's reasonable to
try. They shouldn't have to care about such issues unless necessary. And
in fact they're fine, they never leave filepro which works perfectly.
Any of my co-workers on the other hand, who do need a well-working shell
and ls and vi, and yet insist on using scoansi emulation despite the
problem and despite the fact that we've not run a sco box in years and
are not going back, I say get what they deserve. Being like that
_should_ hurt.
--
bkw
More information about the Filepro-list
mailing list