Ignore accidental keypresses during KbQueue commands

Hi everyone!

I’m implementing a task containing a visual animation (made by Screen commands) and an audio attention task (press Space when you hear a different frequencies on a fixed background frequency) playing simultaneously. I’ve used KbQueue commands to get responses of audio attention task during visual part. Both event.Time and audio stimulus time are saved properly. By this point, I have a questions:
How can I accurately calculate the response time of the participant while s/he may have accidental keypresses during the fixed background frequency or no response to the stimuli? Is there any way to manage these issues while accessing events by KbEventGet()?

Thanks in advance!