Keyboard Listener Help

Now I have 2 movieclip. Mc1 & mc2.
I planned to to make mc2 do certain animation and user must input the key within the progress animation of the mc2 in order prevent something happen

Is there any advice for me to write the code? Thanks for help