event.getKeys with LabJack button-box

Hi all,

I’m working with a button-box connected through LabJack, and trying to find a clean way to collect reaction times. It’s easy to simply poll the state of the button (example at the end of this message). However, it’d be great to have a tool like event.getKeys. This would allow me to run other code while monitoring for responses, only look for presses (not releases), and get time-stamped responses.

Is there a way to use event.getKeys with a LabJack button-box?

Thanks!
geoff

# Is there a way to use event.getKeys instead of
# repeatedly polling the state of the button?
from psychopy.hardware.labjacks import U3
d = U3()
d.getDIOState(16) # Gets the current state of the button

Hi,

Did you ever get a response, or solution to your question? We are trying to do the same thing with a custom keypad.

-Jeff

Using a LabJack, I don’t think so.

If you use a USB2TTL8, the 8 digital inputs can be mapped to keyboard events. It can be configured to generate a keyboard press event when a single digital input line changes state (BITS2KEYS mode), or when all 8 inputs are set to a specific byte value (BYTE2KEYS mode).

Disclosure: I am part owner of LabHackers, the company that makes the USB2TTL8.