I have been conducting my experiments with Psychopy for more than 1 year. Recently, some participants claimed that when they pressed the corresponding key, they have to press the keys twice or more. It is not common in all experiments, but it happens randomly, and I am afraid that the data is not saved completely. (I replaced the keyboard with the new one, but this problem still occurs sometimes).
I don’ know what the reason is, and how I can fix this.
I would be thankful if you can help me.
Hardware guess: Are these regular keyboards (model number would help)? I have had a few thin keyboards that really need a heavy push to register the stroke. You can change the keystroke reading parameters in the BIOS or accessibility settings. Have you tried reducing your code to the minimal and tried the keyboard yourself? When I get trouble like this I copy the expt, strip it to get rid of file IO and write the key pressed to the screen for a few hundred tries. Sit there and hit the keys you will use as responses. BTW is this keyboard on USB or PS/2 or something else?
Software guess: Post your response collection loop so we can see if your are clearing & reading properly. Once in a while I catch myself putting a sleep in before the key read (for debugging and checking the stimulus ) and then forgetting to take it out. Depending on when you clear the events, this might cause the 1st keystroke to be eliminated.
Also, have you tried to run any of the demos that collect keystrokes? Do they work ok?