all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
Subject: Re: last-input-event and X/non-X
Date: Sat, 26 Aug 2006 20:41:10 +0900	[thread overview]
Message-ID: <871wr3d8rt.fsf@catnip.gol.com> (raw)
In-Reply-To: <87y7tb99ua.fsf@tiger.rapttech.com.au> (Tim X.'s message of "Sat, 26 Aug 2006 18:31:41 +1000")

Tim X <timx@nospam.dev.null> 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 <backspace> normally get translated.

e.g. 

    (when (equal (lookup-key function-key-map (vector last-input-event))
                 [127])
       (do something))
       
-Miles    
-- 
"Suppose He doesn't give a shit?  Suppose there is a God but He
just doesn't give a shit?"  [George Carlin]

  reply	other threads:[~2006-08-26 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-26  8:31 last-input-event and X/non-X Tim X
2006-08-26 11:41 ` Miles Bader [this message]
     [not found] ` <mailman.5673.1156592483.9609.help-gnu-emacs@gnu.org>
2006-08-26 12:59   ` Tim X

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871wr3d8rt.fsf@catnip.gol.com \
    --to=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.