Getting PTB to recognise multiple keyboards?

Hi all


I am doing a stimuli presentation on my macbook air, but I'd like the subject to do the task on a separate monitor and keyboard. The monitor works fine, but PTB doesn't seem to recognize the USB keyboard that is connected, even though I can effectively use both keyboards when I'm not running the script. I googled and I can't seem to find any code related to it that I have to add to my script. Any suggestions?


Thanks in advance!

What functions are you using to access the keyboard.  If you use KbWait or KbCheck, make sure you call them with -1, which makes sure that all attached keyboards are polled, e.g. KbWait(-1).  See the help files for these functions for more information.

keith

On Feb 3, 2017, at 2:43 AM, cheeweiyan1@... [PSYCHTOOLBOX] <PSYCHTOOLBOX@yahoogroups.com> wrote:


Hi all


I am doing a stimuli presentation on my macbook air, but I'd like the subject to do the task on a separate monitor and keyboard. The monitor works fine, but PTB doesn't seem to recognize the USB keyboard that is connected, even though I can effectively use both keyboards when I'm not running the script. I googled and I can't seem to find any code related to it that I have to add to my script. Any suggestions?


Thanks in advance!