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

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

Re: Key binding with multiple modifiers


From: Alan Mackenzie
Subject: Re: Key binding with multiple modifiers
Date: Mon, 26 Jan 2004 21:19:01 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

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 via email to

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