Yes I thought my approach seemed too complex. I don't think your first
suggestion will work, because I want to be able to hit AB, ABB, ABBB,
ABBBB etc, where each repeated keystroke B repeats the command. Could
you expand on the second option? It sounds promising, thanks.
On Thu, May 29, 2008 at 9:11 PM, Daniel Pittman <daniel@rimspace.net> wrote:
"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