termcap question

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Mon Feb 21 18:53:49 UTC 2005


On Mon, 21 Feb 2005, Madison Kelly wrote:
> ...The guy told me to edit my '/etc/termcap' file to 
> create a new console ('linux' and 'xterm' didn't work) that "used those 
> codes (see below) for the arrow keys.".

Unfortunately, he didn't really know what he was talking about.  The
/etc/termcap file *documents* the codes sent by keypresses (among other
things), in a software-readable form that programs can understand; it does
not *control* which codes are sent.  (In fact, *his program* should be
looking the console up in /etc/termcap to find out what codes to expect,
rather than arrogantly assuming that it knows what the keys will send.)

There *is* machinery in Linux for controlling what codes the keys send --
unlike old serial terminals, the interpretation of a PC's keyboard is
entirely under software control -- but it doesn't consult /etc/termcap, as
far as I know.  It's complicated and messy, and I haven't done battle with
it for a while, so other people can probably explain its intricacies
better than I can... 

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list