[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capture ALL keystrokes

From: Ben Forbes
Subject: Re: Capture ALL keystrokes
Date: Thu, 29 May 2008 22:01:48 +1000

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 <address@hidden> wrote:
> "Ben Forbes" <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]