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

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

Re: How does the Meta/Alt-Key work behind the scenes?


From: Stefan Monnier
Subject: Re: How does the Meta/Alt-Key work behind the scenes?
Date: Wed, 31 Oct 2012 14:00:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> Maybe I asked to early since further testing revealed that it is not a
> general problem but a problem of some keys only:

Some control combinations exist in ASCII others don't.
Those that don't either don't work or need to be turned by your terminal
emulator into some kind of byte sequence, usually using some kind of
escaping mechanism.

Try: "emacs -nw -Q" and then "C-% C-% C-h l"
In the *Help* buffer you'll then see the bytes received by Emacs and
you'll notice that C-% is not there.  They've been replaced by escape
sequences (in my case it looks like "ESC [ 2 7 ; 6 ; 3 7 ~" is the
sequence sent by my terminal emulator for C-%).

Emacs handles this via the `input-decode-map' to convert this sequence
back into its more meaningful "C-%".  This map is mostly initialized
from the terminfo database (and completed by lisp/term/$TERM.el).


        Stefan


reply via email to

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