KbWait doesn't get keyboard inputs once it has been disconnected

Hi,

I am using Psychtoolbox on a Mac. I realized that Psychotoolbox becomes unable to read the keyboard inputs once the keyboard has been disconnected and reconnected. KbCheck returns 0, KbWait gets frozen, and PsychHIDTest returns "PsychHID: SetReport error 0xE00002D9. kIOReturnNotAttached: A 'device not attached' condition was detected by one of the general routines of the I/O Kit framework."

This is particularly annoying, because I am using a long cable to connect the keyboard (trough ethernet) and I sometimes get microdisconnections. 

Any idea of how I could fix this problem ?

Thank you

Guillaume