From: Daniel Pittman <daniel@rimspace.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Capture ALL keystrokes
Date: Thu, 29 May 2008 21:11:45 +1000 [thread overview]
Message-ID: <87hcch74b2.fsf@rimspace.net> (raw)
In-Reply-To: 206a409a0805290336m5b3ef264qab3bedca5f040e4b@mail.gmail.com
"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
next prev parent reply other threads:[~2008-05-29 11:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 10:36 Capture ALL keystrokes Ben Forbes
2008-05-29 11:11 ` Daniel Pittman [this message]
2008-05-29 12:01 ` Ben Forbes
2008-05-29 13:32 ` Lennart Borgman (gmail)
2008-05-29 15:10 ` Tassilo Horn
[not found] <mailman.12372.1212057381.18990.help-gnu-emacs@gnu.org>
2008-05-30 9:57 ` harven
2008-05-30 11:21 ` Ben Forbes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hcch74b2.fsf@rimspace.net \
--to=daniel@rimspace.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).