| Reference | Downloads | Github

Keyboard input not advancing to next routine

URL of experiment:

Description of the problem: The experiment works locally. I have worked through several error messages in translating python code components into java and was able to get the experiment to open via Pavlovia. The first routine (an instruction screen) loads, but key 5 (the only allowable response) does not advance to the next routine. I tried adding the java code suggested here (Failing to use Keyboard in Pavlovia) to a Code Component to “set up” the keyboard, but it did not help.

Any advice very much appreciated! Also is there a way to see error messages when running an experiment on Pavlovia?

Why is there no start time specified for either the text stimulus or keyboard on that routine? If you set both of them to start at 0 seconds, does make a difference?

1 Like

Hi Michael–thanks for that suggestion. I’m not sure why the start times were missing. I did change the start times to 0, re-sync the updated task, and tried to run it again—with no luck. The task is still not responding to keyboard input.

I also tried adding (and then removing) the below code to the first routine’s code component, but that didn’t work either.

my_keyboard = new core.Keyboard({psychoJS: psychoJS, clock: new util.Clock(), waitForStart: true})

You shouldn’t create a new keyboard in code, that will only conflict with the graphical keyboard component, which should be more than sufficient for this task.

OK, so let’s try to narrow things down.

  • The text stimulus does show though?
  • What happens if you give both components a fixed duration. Does the next routine show up as expected? i.e. is it possible that the issue is actually with the start of the next routine, and not with ending the first one?
  • What happens if you allow any key?
1 Like

Thanks Michael–there seem to be numerous issues that are interacting with one another. I will have to rebuild the task piece by piece in Pavlovia and see what is breaking the task.