From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: last-input-event and X/non-X Date: Sat, 26 Aug 2006 22:59:56 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87u03z8xf7.fsf@tiger.rapttech.com.au> References: <87y7tb99ua.fsf@tiger.rapttech.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1156599642 23895 80.91.229.2 (26 Aug 2006 13:40:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Aug 2006 13:40:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 26 15:40:40 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGyOm-0000ot-Ez for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Aug 2006 15:40:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGyOm-0008VB-1m for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Aug 2006 09:40:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!feeder3.cambrium.nl!feed.tweaknews.nl!sn-xt-ams-06!sn-xt-ams-08!sn-ams!sn-feed-ams-02!sn-post-ams-02!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:d04cw30I9BPkE32Gf6YFiml3+Go= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 31 Original-Xref: shelby.stanford.edu gnu.emacs.help:141327 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:36949 Archived-At: Miles Bader writes: > Tim X writes: >> ((or (eq last-input-event 127) >> (eq last-input-event 'backspace)) >> (do-something)) >> >> but that seems a bit clunky to me. Also, I'm not sure how well this >> will work with other character sets or encodings or on other >> platforms, like Windows. > > You might try looking up the event in `function-key-map', which is how > platform-specific things like normally get translated. > > e.g. > > (when (equal (lookup-key function-key-map (vector last-input-event)) > [127]) > (do something)) > thanks Miles - that is a good idea. I was actually just delving into the key maps as I figured there had to be something like that. You have saved me a bit of time by narrowing the search space a bit. Thanks. Tim -- tcross (at) rapttech dot com dot au