[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Capture ALL keystrokes
From: |
Daniel Pittman |
Subject: |
Re: Capture ALL keystrokes |
Date: |
Thu, 29 May 2008 21:11:45 +1000 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) |
"Ben Forbes" <bdforbes@gmail.com> writes:
> When some keystroke A is entered, I set a flag, and I want this flag
> to be unset if any keystroke is entered except some keystroke B. So
> basically, I only want keystroke B to have any effect if it is
> preceded by keystroke A. How can I do this?
The standard way would be:
(define-key global-map [(a)(b)] #'my-function)
Alternately, make a keymap, point the `a' key to it, and then install
handlers into it.
Your approach is, in essence, "doing it wrong."
Regards,
Daniel