What did you try to make it work?:
I’m trying to run an experiment using textbox with Arabic language which follows right to left language style. I still got the Arabic letters written from left to right even when I changed the style to Arabic and RTL style.
In the English version of the study I used the following codes for as follows:
in begin experiment tab I have:
inputText3 = ""
In begin experiment tab:
inputText3 = ""
actualKeys=""
shift_flag = False
event.clearEvents(‘keyboard’)
In each frame tab I have:
actualKeys = event.getKeys()
n = len(actualKeys)
i = 0
while i < n:
if actualKeys[i] == ‘return’:
continueRoutine = False
break
elif actualKeys[i] == ‘backspace’:
inputText3 = inputText3[:-1] # lose the final character
i = i + 1
elif actualKeys[i] == ‘space’:
inputText3 += ’ ’
i = i + 1
elif actualKeys[i] in [‘minus’, ‘-’, ‘num_subtract’, ‘Minus’, ‘slash’]:
inputText3 += ‘-’
i = i + 1
elif actualKeys[i] in [‘lshift’, ‘rshift’, ‘SHIFT’]:
shift_flag = True
i = i + 1
else:
if len(actualKeys[i]) == 1:
if shift_flag:
inputText3 += actualKeys[i].upper()
shift_flag = False
else:
inputText3 += actualKeys[i]
i = i + 1
In end routine tab:
thisExp.addData(“typedWord3”, inputText3)
inputText = ""
but these codes are not working at all in the Arabic version. I tried the text box and at least I got the Arabic letters displayed in the screen but in the wrong alignment (LTR).
I’m not sure if I need specific coding and whether or not there a way to make it using textbox?
Thank you
Ghozayel