电脑字母呈现的是小写想要呈现为大写,capslk切换也不行,还是小写。用的是python的psychopy,应该怎么改啊

begain routine

modify = False
text.text = ''
event.clearEvents('keyboard')

each frame

keys = event.getKeys()
if len(keys):
    if 'space' in keys:
        text.text = text.text + ' '
    elif 'backspace' in keys:
        text.text = text.text[:-1]
    elif 'lshift' in keys or 'rshift' in keys:
        modify = True
    elif 'return' in keys:
        continueRoutine = False
    else:
        if modify:
            text.text = text.text + keys[0]
            modify = False
        else:
            text.text = text.text + keys[0]
thisExp.addData("回忆", text.text)