Dear Mario and others,
I found that
KbCheck(-1) implicitly starts KbQueue under Windows:
clear all % prepare for the test, **line by line** KbEventAvail % returns 0 as expected, since no queue created or started KbCheck(-1); % check all keyboards KbEventAvail % now it returns 5, indicating queue started somehow clear all % try again KbCheck; % no input, but it is still for all keyboards under Windows KbEventAvail % return 0 as expected
Is this behavior expected, or it is some kind of side effect? Any workaround?
A quick test under OSX and Linux 18.04 did not show the issue, KbEventAvail returning 0 always.
Let me know if you need more information. Thanks.
Digging into KbCheck.m, under Windows,
KbCheck without input calls
Screen('GetMouseHelper'). So it makes sense that the latter won’t affect
So the symptom is that
PsychHID('KbCheck') starts queue, and fills event buffer. I changed the subject to reflect this.