Temporally accurate indication when key is pressed

Hi,

I am looking to give people using my program immediate feedback. The subject task is to depress a key for a certain length of time. I would like to indicate to them when the spacebar is depressed by either changing the color of the screen, displaying an image, or a short sound. I was trying the sound option, but experienced too much lag. I just read that imread for displaying a pic is not temporally efficient.

I was wondering: what would be the most temporally accurate way to tell subjects that the key is indeed depressed?

Thanks for the help and suggestions. Right now I am using a KbEventGet function to time the difference between key press and key release.

-ab