From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: Macintosh Command Key Date: 1 Apr 2005 08:29:55 -0800 Organization: http://groups.google.com Message-ID: <1112372995.606713.126040@g14g2000cwa.googlegroups.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1112373213 6249 80.91.229.2 (1 Apr 2005 16:33:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2005 16:33:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 01 18:33:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DHP4r-0005p6-SB for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Apr 2005 18:32:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHPLo-0002Dl-L8 for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Apr 2005 11:50:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: 198.74.20.78 Original-X-Trace: posting.google.com 1112373000 3321 127.0.0.1 (1 Apr 2005 16:30:00 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 1 Apr 2005 16:30:00 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=198.74.20.78; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:129782 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25338 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25338 > I am using a version of emacs for OS X. Does anybody know how to > reference the Macintosh Command key (Apple key) in elisp? (I would like > to add a global-set-key function call for the command key in my .emacs > file.) > In general, you can type C-h c followed by any key and see a message about what keystroke you just typed (from Emacs point of view). I just wrote this the other day. (defun insert-sequence-key (key) "Inserts a keystroke suitable for use in fcns like global-set-key" (interactive "kInseret key chord: ") (insert (format "(kbd \"%s\")" (key-description key))))