Millisecond Forums

Inputdevice Keyboard

https://forums.millisecond.com/Topic20365.aspx

By Brainsrule - 12/9/2016

How do I edit the BART-Y script to accept inputs from a 2-button response box? Outputs from the box correspond to a '1' and a '2' keyboard press. I'm having trouble finding the proper documentation for this process.
By Dave - 12/9/2016

Brainsrule - Friday, December 09, 2016
How do I edit the BART-Y script to accept inputs from a 2-button response box? Outputs from the box correspond to a '1' and a '2' keyboard press. I'm having trouble finding the proper documentation for this process.

You need to adjust the /inputdevice settings in the script and then adjust any /validresponse, /correctresponse, /isvalidresponse, /iscorrectresponse, /responsemessage, and /branch logic that relies on a trial's response property accordingly.
By Dave - 12/9/2016

Dave - Friday, December 09, 2016
Brainsrule - Friday, December 09, 2016
How do I edit the BART-Y script to accept inputs from a 2-button response box? Outputs from the box correspond to a '1' and a '2' keyboard press. I'm having trouble finding the proper documentation for this process.

You need to adjust the /inputdevice settings in the script and then adjust any /validresponse, /correctresponse, /isvalidresponse, /iscorrectresponse, /responsemessage, and /branch logic that relies on a trial's response property accordingly.

The attached BARTY script takes input from the keyboard. It relies on the "1" and "2" keys at the top row of the keyboard, their respective keyboard scancodes are 2 and 3 (to check which scancodes your response box returns, use Tools -> Keyboard Scancodes... in Inquisit Lab; adjust the script accordingly, i.e. replace the 2 and 3 scancodes with those pertaining to your response box device).
By Brainsrule - 12/9/2016

Dave - Friday, December 09, 2016
Dave - Friday, December 09, 2016
Brainsrule - Friday, December 09, 2016
How do I edit the BART-Y script to accept inputs from a 2-button response box? Outputs from the box correspond to a '1' and a '2' keyboard press. I'm having trouble finding the proper documentation for this process.

You need to adjust the /inputdevice settings in the script and then adjust any /validresponse, /correctresponse, /isvalidresponse, /iscorrectresponse, /responsemessage, and /branch logic that relies on a trial's response property accordingly.

The attached BARTY script takes input from the keyboard. It relies on the "1" and "2" keys at the top row of the keyboard, their respective keyboard scancodes are 2 and 3 (to check which scancodes your response box returns, use Tools -> Keyboard Scancodes... in Inquisit Lab; adjust the script accordingly, i.e. replace the 2 and 3 scancodes with those pertaining to your response box device).

Okay I added that and patched up a few more lines, and it works great! thank you!