[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: last-input-event and X/non-X
From: |
Miles Bader |
Subject: |
Re: last-input-event and X/non-X |
Date: |
Sat, 26 Aug 2006 20:41:10 +0900 |
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]