unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Inhibit more keyboard event during execution of function
@ 2009-12-28 21:49 Mathias Dahl
  2009-12-29  6:51 ` Kevin Rodgers
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Mathias Dahl @ 2009-12-28 21:49 UTC (permalink / raw)
  To: help-gnu-emacs

I have made a small game for my kid that lets him press a key and that
will play a sound and display an image. It is implemented as a major
mode with a keymap where each key is defined using `define-key' and
bound to a special play command with a string of what to play (say,
"cow"). Now, it works for me, but when I tested this on my son today he
kept the key pressed way longer than I do, with the effect that the key
repeats, playing the sound many times. Quite annoying. Is there a way to
get around this? I have been thinking of having some timing built in so
that I will not play again unless a certain time has passed.

Also, even though I tell Emacs to draw the image first (using
`insert-image-file'), it is not displayed until the sound has stopped
playing (I use `play-sound-file'). Any way around this?

Thanks!

/Mathias


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-12-31  7:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28 21:49 Inhibit more keyboard event during execution of function Mathias Dahl
2009-12-29  6:51 ` Kevin Rodgers
     [not found] ` <mailman.367.1262069524.18930.help-gnu-emacs@gnu.org>
2009-12-29 20:03   ` Mathias Dahl
2009-12-29 20:53     ` Lennart Borgman
     [not found]     ` <mailman.388.1262120023.18930.help-gnu-emacs@gnu.org>
2009-12-29 22:40       ` Mathias Dahl
2009-12-29 23:52         ` Lennart Borgman
2009-12-29 22:11 ` Ilya Zakharevich
2009-12-29 22:38   ` Mathias Dahl
2009-12-29 22:56 ` Mathias Dahl
2009-12-29 23:00   ` Mathias Dahl
2009-12-30  9:52     ` Andreas Politz
     [not found]     ` <mailman.421.1262166805.18930.help-gnu-emacs@gnu.org>
2009-12-31  7:51       ` Mathias Dahl

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).