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

Bug#2313: xterm keymapping problems suspected



Bill Mitchell:
   When I looked at us.map, I was expecting to find keycode 14 mapped
   to BackSpace and keycode 111 mapped to Delete.  I guess that there
   must be some logical reason why keycode 14 is mapped to Delete and
   keycode 111 to "\033[3~", but it's not obvious to me.

The short answer is that the linux console is designed to act as [a
superset of the] vt100 terminal, and that's what vt100 does.

The long answer goes back to the days of the Teletype and paper tape
(and, possibly, punched cards).  The original Teletypes (such as the
ASR-33) were printing terminals -- they were a keyboard and an impact
printer and everything received was typed out on the printer (assuming
full duplex operation, which made your life simpler).  They also had
paper tapes -- you could set the paper tape to punch out every
character received, and later on you could feed the tape back into the
system (for example, to load some program onto the remote system).

If you made a mistake on the paper tape, it typically could be rubbed
out by punching all the holes in the tape (the systems would ignore
tape positions with no holes punched or all holes punched).  [Note:
this worked well with even parity.]  So, stated simplistically, you
could have a rubout key which would delete the last character you'd
typed and remove it from your paper tape.

When video terminals were first developed, backwards compatability
with the existing base of printing terminals was an important aspect
of their design.  On a printing terminal, you could have a
non-destructive backspace (control-H) which would allow you to do
overstrike sequences (rather like compose on modern keyboards).  By
the way, programs like more and less explicitly look for some of these
overstrike sequences to and represent some of them with highlighting.

I don't think that video terminals were much considered when ascii was
developed.

Anyways, the key to delete the previous character on the vt100 was
distinct from the key to move the cursor backwords one character
position, and the linux console is compatible with this design.

--
Raul


Reply to: