Hello!
I couldn’t get my PY code to work on the online version of my experiment of Pavlovia, but it works on the desktop version. I read that you need to translate the PY code into JS. Would anyone be able to help me with this? I have no experience with JS. Here is my code:
templist=R1Name.keys
if templist.count('return')==1:
R1Name.keys.pop()
R1Name.keys=''.join(R1Name.keys)
R1Name.rt=R1Name.rt[0]
continueRoutine=False
elif templist.count('space')==1:
R1Name.keys.pop()
elif templist.count('lshift')==1:
R1Name.keys.pop()
elif templist.count('backspace')>=1 and len(R1Name.keys)>=2:
R1Name.keys.remove('backspace')
R1Name.keys.pop()
msg=msg[:-1]
elif templist.count('backspace')>=1 and len(R1Name.keys)==1:
R1Name.keys.pop()
elif (len(R1Name.keys)-1) == numkeys:
msg=''
msg=msg.join(R1Name.keys)
numkeys=len(R1Name.keys)