我想在电脑上呈现的全为大写字母,这个出来的都是小写字母,怎么改哩!
本帖最后由 heihlinak 于 2020-3-29 15:42 编辑在psychopy code 里设置的,当按下键盘时只能呈现小写字母,想要都呈现成大写字母
Routine里是
modify = False
text.text = ''
event.clearEvents('keyboard')
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.upper()
modify = False
else:
text.text = text.text + keys
capslock键 乘号 发表于 2020-3-30 08:50
capslock键
试过了,不行啊
页:
[1]