Delayed Keyboard Re-enabling

Hi everyone,

I'm currently running a few tasks in Psychtoolbox gathering simple keyboard inputs from participants. I'm using KbQueueCreate/Start/Release to control when to read keyboard information and what to read specifically.

I'm collecting the relevant data with absolutely no problem; however, I'm finding that upon completion of my tasks, the MATLAB command window does not display any keyboard input until I have pressed any key a total of three times. After this, I can start typing in the command window again.

Has anyone else come across this problem? Is this something to do with the Kb functions I'm using?

Kind Regards,
Yan