From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Modifier state? Date: Fri, 13 Feb 2009 12:25:46 -0800 Message-ID: <009201c98e19$414f4350$0200a8c0@us.oracle.com> References: <1B1D3F3E-49CC-4488-B3D8-5189B834412E@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1234556783 13961 80.91.229.12 (13 Feb 2009 20:26:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2009 20:26:23 +0000 (UTC) To: "'David Reitter'" , "'Emacs-Devel devel'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 13 21:27:38 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LY4d9-000088-8f for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2009 21:27:23 +0100 Original-Received: from localhost ([127.0.0.1]:38983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LY4bp-0003Y2-4W for ged-emacs-devel@m.gmane.org; Fri, 13 Feb 2009 15:26:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LY4bk-0003Xm-SZ for emacs-devel@gnu.org; Fri, 13 Feb 2009 15:25:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LY4bj-0003XY-As for emacs-devel@gnu.org; Fri, 13 Feb 2009 15:25:56 -0500 Original-Received: from [199.232.76.173] (port=33586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LY4bj-0003XV-6v for emacs-devel@gnu.org; Fri, 13 Feb 2009 15:25:55 -0500 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:52930 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LY4bi-0001za-QH for emacs-devel@gnu.org; Fri, 13 Feb 2009 15:25:55 -0500 Original-Received: from acsinet13.oracle.com (acsinet13.oracle.com [141.146.126.235]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n1DKPMGn007899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Feb 2009 20:25:23 GMT Original-Received: from acsmt705.oracle.com (acsmt705.oracle.com [141.146.40.83]) by acsinet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n1DKPoeK032289; Fri, 13 Feb 2009 20:25:54 GMT Original-Received: from dradamslap1 (/141.144.80.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 13 Feb 2009 20:25:44 +0000 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1B1D3F3E-49CC-4488-B3D8-5189B834412E@gmail.com> Thread-Index: AcmOGJBqIiNmaIBvT7a1iDjmV9KvYgAAGELQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt705.oracle.com [141.146.40.83] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020B.4995D74C.01B1:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109050 Archived-At: > Do we have a way to detect the modifier state from the Lisp > level, or bind commands to modifier state changes? > > I'd like to run a command whenever the user presses and releases the > Meta (not ESC) key. This would be on non-TTY sessions. > > A lot of applications show additional info when you press Alt/Option > (which is Meta for me); they even update the menus with alternative > functions. The user can even view a menu, press and hold Alt/Option > and see the menu items change. Someone else will perhaps correct this or provide more up-to-date info, but you might take a look at function `event-modifiers'. See the Elisp manual, nodes Keyboard Events and Classifying Events.