termcap
Fairlight
fairlite at fairlite.com
Wed Apr 18 19:04:45 PDT 2018
On Wed, Apr 18, 2018 at 06:03:10PM -0700, Bob Rasmussen via Filepro-list thus spoke:
> On Wed, 18 Apr 2018, Jose Lerebours wrote:
>
> >scoansi is the closest thing to work 100%. Lines draw nicely but
> >DEL key does not ... People are having a hard time using Ctrl-C in
> >lieu of DEL.
>
> That requires an stty command, which I'm hoping someone else will provide.
For Control-C: stty intr "^C"
For Delete: stty intr "^?"
Your backspace/delete will usually often to be remapped depending upon your
intr setting:
For Control-H backspace: stty erase "^H"
For Delete backspace: stty erase "^?"
SCO's default combo: stty intr "^?" erase "^H"
Those are -just- the stty settings, and will get you what you want -if-
your terminal emulator supports those key emissions already.
However, on the actual -console- (the virtual consoles, F1-Fn, and all
permutations thereof...you can get at least 64, I believe, with various
key combinations, e.g., Alt-F1, AltGr-F1, etc.), the keyboard mapping
for Delete is really an IBM Erase sequence of "^[[3~" if memory serves
correctly. That's because they -strictly- adhered to the original vt100
spec.
To get the virtual consoles actually emitting the correct "^?" for the
Delete key, you need to redefine the keysyms for Backspace and Delete. See
section 5.2 of this document:
http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-5.html
It's worth noting that you 1) can put the keysym definitions in a file and
use loadkeys with the file, rather than as a 'here' statement, 3) loadkeys
(if memory serves) affects -all- VCs at once, and 3) you will need to do
this -every- time you reboot. Stick it in rc.local, or write a systemd
entry for it, depending upon your flavour. Almost everything is now
systemd, so that's probably what you need to use. Create a shell script
which does the work, and create a service configuration which invokes the
script at boot.
> I believe you have no choice but to use 'linux' at the console. But
> you don't have to set the same throughout. Let the "terminal" set
> its own TERM variable. Make your startup script set FPTERM depending
> on TERM, if necessary.
Linux is closest to a vt100. That's the whole reason Delete is really
Erase in the first place. It was a conscious design decision when they
initially wrote the console driver. That would have been either Linus or
Alan, probably.
Now, PuTTY is actually closest to xterm, and you should usually use xterm
as a template (-especially- if you're going to use screen(1)), along with
xterm function key settins in PuTTY.
It's really the Linux VCs which are the bitch due to loadkeys. Well, that
and X11. Inside X11, you'll need to use xmodmap. See section 5.3 of the
same document.
Now, remember...I never help anyone, and I'm a complete bastard.
You're welcome. :)
m->
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list