help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Inhibit more keyboard event during execution of function


From: Mathias Dahl
Subject: Re: Inhibit more keyboard event during execution of function
Date: Tue, 29 Dec 2009 12:03:50 -0800 (PST)
User-agent: G2/1.0

> I don't know if this will work, but you could try let-binding
> unread-command-events to nil while the sound is being played.
> The idea is that any input events would be added to the queue,
> but when the sound is done the queued events would be discarded
> and the command loop wouldn't see them.

Thanks! It sounded like a good idea but it did not work. This is what
I did:

(defun esb-play (thing)
  "Play sound and display image for THING."
  (let ((unread-command-events nil))
    (esb-display-image (concat esb-data-dir thing ".jpg"))
    (play-sound-file ...
    ...

If I keep a key pressed or type it repeatedly it will still
"record" (queue?)
what is pressed during play.

Any other ideas?

/Mathias


reply via email to

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