help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Slightly OT: Where are keycodes defined for emacs -nw in X-Windows?


From: Alan Mackenzie
Subject: Re: Slightly OT: Where are keycodes defined for emacs -nw in X-Windows?
Date: Sun, 26 Oct 2003 10:19:05 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Stefan Monnier <address@hidden> wrote on Fri, 24 Oct 2003
20:15:24 GMT:
>> Searching the info pages brought me to the page "Terminal Specific" in
>> the Elisp manual.  Checking the environment variable TERM brought me
>> to the initalisation file ...../lisp/term/xterm.el.  In this file,
>> only a small number (21) of function keys are defined, none of them
>> with modifiers (i.e. C- M- S- ....).

Thanks Stefan, thanks Barry, for chrystal clear answers in record time!

> The sequences are poorly standardized, especially the ones with
> modifiers.  That's why they're absent mostly.  But since it generally
> doesn't hurt to add bindings to that table (as long as there's no
> collision between two different bindings for the same sequence), feel
> free to send patches to complete the table.

On my xterm, the modifier keys get filtered out, so that C-up and up
degenerate into the same event sequence.  :-(

>> Where on X is the file which defines the relevant keytable, and what's
>> the name of the function in X which loads such a table (analogues of
>> /etc/default.keytab and loadkeys for the Linux console)?

> X is not directly at fault.  The translation from C-up to a sequence of
> ASCII codes is done by your terminal emulator, so you need to look at
> the doc of your xterm, kterm, what-have-you-term, ...

<rant mode>
[... several frustrating hours later ... ].  The documentation of xterm
is of lesser quality than that of Emacs.  As well as its man-page, I've
got an introductory users' guide to X (a book).  It goes on and on and on
about the syntax of "resources" (whatever they are), but doesn't seem to
say whether they are compiled in with the application, are loaded from
some file, or what.  It spends nearly 30 pages (not counting a dump of
the complete man-page) describing xterm, yet fails to say where to find
the keyboard translation table used, or even give any pointers.  After
all, who'd want to know that anyway?

The glossary in this book lacks an entry for "resource", presumably on
the grounds that everybody knows what one is anyway, and an accurate
definition might spoil that nice warm feeling that you're meant to get
because "you've got lot's of resources, therefore you must be very
wealthy".  However, the glossary _does_ have an entry for "mouse", useful
for those people who don't know what that moveable lump of plastic beside
their keyboards is called.
<\rant mode>

Obviously the place to carry this on would be an X newsgroup, not here.

> Then Emacs turns those sequences back into meaningful events based on
> the lisp/term/$TERM.el file but also based on the terminfo of your
> terminal.

Yes.  I'm begining to wish I hadn't asked the question.  Obviously if I
want to get anywhere, I'm going to have to spend a _lot_ of time learning
about X.  That would be a lot of time not available for hacking Emacs.
:-(

Thanks anyhow!

>         Stefan

-- 
Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").



reply via email to

[Prev in Thread] Current Thread [Next in Thread]