Millikey (LaBHackers) Button Box integration in PsychoPy 2024.1.5

Hi everyone,

I’m trying to use a Millikey SR-R1 button box (by LabHackers) to collect responses and reaction times in a PsychoPy experiment, but I haven’t been able to get it working so far.

I’m using PsychoPy version 2024.1.5 on Windows 11, and unfortunately I can’t update to a newer version. I have already installed the “LabHackers Research Equipment Support” plugin from the PsychoPy package manager. However, I don’t see any new components showing up in Builder after installing it. I’m connecting the Millikey via USB and when I test it in Notepad, button presses do generate characters, so it looks like the device is working on the system.

I also tried using the standard “Button Box” component, but it doesn’t detect the device either.

I also tried integrating the button box through a code component, using the following in the “Begin Experiment” tab (python):

from psychopy_labhackers.millikey import MillikeySerialButtonGroup
millikey = MillikeyHIDButtonGroup()

In the “Begin Routine” tab:

millikey.clearEvents()

And in “Each Frame”:

keys = millikey.getKeys()
if keys:

  • rt = millikey.clock.getTime()*
  • key_pressed = keys[0]*
  • thisExp.addData(“button”, key_pressed)*
  • thisExp.addData(“rt”, rt)*
  • continueRoutine = False*

Unfortunately, this gives me a ModuleNotFoundError, even though the plugin is installed. I’ve tried both MillikeySerialButtonGroup and MillikeyHIDButtonGroup

Since I need to collect accurate reaction times, it would really help to use the Millikey instead of a regular keyboard.

If anyone has experience with the Millikey or knows how to integrate it properly with PsychoPy 2024.1.5, I’d greatly appreciate your help!

Thanks in advance!

Hi @ana_grvt,

I believe that the Millikey should be detected as a standard keyboard (from the ‘Features’ section of this page in their docs), so could you please try adding a keyboard component to your task and see if the Millikey responses are detected?

(This post might also be helpful regarding how to enter numbers into the Allowed keys field)

Thanks so much,

Kim

The fact that it gives ModuleNotFoundError rather than any other error suggests it’s a problem with the installed package not being detected - how did you install it? Via the plugin manager dialog or via command line?