unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Alan Mackenzie<none@example.invalid>
Subject: Re: Key binding with multiple modifiers
Date: Mon, 26 Jan 2004 21:19:01 +0000	[thread overview]
Message-ID: <5804vb.pb.ln@acm.acm> (raw)
In-Reply-To: acb6374c.0401261318.32746d11@posting.google.com

Chris Laux <Christopher.laux@web.de> wrote on 26 Jan 2004 13:18:43 -0800:
> Hello,

> What is the correct way to bind a key modified by both the control and
> the meta key?  I failed to find an example in the help texts and the
> following command doesn't work:

Have a look at the info page "How do I bind a combination of modifier key
and function key?" under "Key Bindings" in the Emacs FAQ.

Another useful trick is to do the binding interactively with M-x
global-set-key, etc., then use C-x <esc> <esc> (`repeat-complex-command')
to see what it looks like in lisp.

> (global-set-key "\C-M-7" 'shell)

"\C-\M-7" is a correct syntax.

> When I try the following, the binding is listed when accessed with C-h
> b, but actually pressing the keys just gets "C-M-7" printed in the
> minibuffer:

> (global-set-key [C-M-7] 'shell)

At least your operating system seems to generate something sensible for
this key event.

> Any help would be greatly appreciated,

After typing the keys, do C-h l (`view-lossage') to check what Emacs
_really_ saw.

Try C-h c followed by C-M-7.

> Chris

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

  reply	other threads:[~2004-01-26 21:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-26 21:18 Key binding with multiple modifiers Chris Laux
2004-01-26 21:19 ` Alan Mackenzie [this message]
2004-01-27 11:11   ` Chris Laux
2004-01-27 19:58     ` Kevin Rodgers
2004-01-28 18:53     ` Stefan Monnier
2004-01-31 20:17       ` Kai Grossjohann
2004-01-26 21:26 ` Jesper Harder
2004-01-26 22:13 ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5804vb.pb.ln@acm.acm \
    --to=none@example.invalid \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).