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: Stefan Monnier
Subject: Re: Slightly OT: Where are keycodes defined for emacs -nw in X-Windows?
Date: Fri, 24 Oct 2003 20:15:24 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> 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- ....).

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.

In the Emacs-CVS code, I've added a binding for C-up but it uses a different
sequence than yours (more specifically ESC [ 0 5 A).  This is the binding
I get on my GNU/Linux system.  Obviously, different GNU/Linux systems
will not necessarily all use the same 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, ...

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.


        Stefan



reply via email to

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