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?