With current technology, you can't prevent the user from pressing keys, but you can ignore any key presses that they make. Here's a handler that will make your movie ignore everything except vowels:
the keyDownScript = \
"if ""E&"aeiou""E&" contains the key then"&RETURN&\
" -- Let the key press be treated"&RETURN&\
" end if"
If the #keydown event is stopped then no sprite or member will receive an indication that a character has been typed.
You might like to look at the keydown event handler and build your own custom solution.
what I need is to limit keys for a few seconds. this is to stop a key from being pressed then pressed immediately afterwards before it should be pressed again. Ill see If I can work this into that thanks
after trying the code it gave me an error after the 1st line. operand expected. but I made some progress by linking the button press to the animation time. pressing a button before an animation is finished. wont cause the button to fire. which is what I was after