[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: last-input-event and X/non-X
From: |
Tim X |
Subject: |
Re: last-input-event and X/non-X |
Date: |
Sat, 26 Aug 2006 22:59:56 +1000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Miles Bader <miles@gnu.org> writes:
> 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))
>
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