all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How does the Meta/Alt-Key work behind the scenes?
Date: Wed, 31 Oct 2012 14:00:48 -0400	[thread overview]
Message-ID: <jwvk3u67cg7.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: mailman.12074.1351700673.855.help-gnu-emacs@gnu.org

> 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


  parent reply	other threads:[~2012-10-31 18:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12043.1351673061.855.help-gnu-emacs@gnu.org>
2012-10-31 15:02 ` How does the Meta/Alt-Key work behind the scenes? Stefan Monnier
2012-10-31 16:24   ` Thorsten Jolitz
     [not found]   ` <mailman.12074.1351700673.855.help-gnu-emacs@gnu.org>
2012-10-31 16:51     ` William Gardella
2012-10-31 17:43       ` Thorsten Jolitz
2012-10-31 18:00     ` Stefan Monnier [this message]
2012-10-31 19:32       ` Thorsten Jolitz
2012-10-31  8:44 Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk3u67cg7.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.