When you have a "keyDown" event:
- lock messages
- do your tasks
- use the "flush" function to remove all keyboard events from the queue
- unlock messages
I haven't tried the above, but it seems like it would work. If it
doesn't, you might try:
- stop passing "keydown" messages
- do your tasks
- flush keyboard events
- start passing keydown's again
In MetaTalk it could look like this:
local bReadyForNextKey
on openCard
put "true" into bReadyForNextKey
end openCard
on keyDown pKey
if not bReadyForNextKey then exit keyDown
put "false" into bReadyForNextKey
doYourTasks
put "true" into bReadyForNextKey
get flush(keyDown, keyUp, autoKey)
end keyDown
Hope this helps... hope this works!
Regards,
Phil
[EMAIL PROTECTED] wrote:
>
> In the stack I've been designing for 12 mo to 18 mo old toddlers, I
> utilize "KeyDown" often since most children can succesfully manage pressing
> anykey on the keyboard to navigagte a computer, even as early as 10-12 mo of
> life. My problem is I can't figure out how to abort multiple keydowns. Any
> solutions. I had this problem in Hypercard also...
>
> Scott Yang
>
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
--
Phil Davis
------------------
[EMAIL PROTECTED]
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.