Record multiple keys

Hi Jan,
Because Emily needs to handle other aspects of the keys conditionally in code, and that would conflict with a keyboard component.

Emily:

  • You can’t assign a value to keysPressed.append(). It is a function, not a variable. That line should be

    keysPressed = ‘’

  • You don’t seem to have actually inserted the code I suggested in the other thread under the section of code for when t < 2:

    elif t < 2.0: 
        # for the first key press:
        if not end_at_2s:
            thisExp.addData('RT', t)
            end_at_2s = True 
            
        # for all key presses:
        for key in keys:
            keys_pressed = keys_pressed + key # concatenate multiple keys
        thisExp.addData('rating', keys_pressed) # update the data

which should now fix the issue about adding keys to a list of keys.