From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Key binding with multiple modifiers Date: Mon, 26 Jan 2004 21:19:01 +0000 Organization: muc.de e.V. -- private internet access Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <5804vb.pb.ln@acm.acm> References: NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1075159147 19664 80.91.224.253 (26 Jan 2004 23:19:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2004 23:19:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 27 00:18:59 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AlG0Q-0005ME-00 for ; Tue, 27 Jan 2004 00:18:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AlFy7-0001nO-93 for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2004 18:16:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news2.telebyte.nl!newsfeed.stueberl.de!news.space.net!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1075157796 29407 193.149.49.134 (26 Jan 2004 22:56:36 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 26 Jan 2004 22:56:36 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:120450 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16397 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16397 Chris Laux 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 (`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").