3/27/2023 0 Comments Psychopy key response![]() ![]() ThisExp. If len(response) > 0: # either a or l was pushed So not really sure what you mean by differential response to a and l in that respect.Īnyway, try something like the code below: All of the key press handling should be done in code, or else you get strange conflicts like this. You shouldn't be having multiple keyboard components. It shouldn't matter what key is pressed, neither should be storing anything based on the code I sent last time. Only thing now is the 'a' key won't record the response time as there is no builder component for it, but i'm sure that is a relatively easy bit of code to add in. EmailĬommunications with the University of Nottingham may be monitored as This message has been checked for viruses but the contents of anĪttachment may still contain software viruses which could damage yourĬomputer system, you are advised to perform your own checks. Any views or opinions expressed by theĪuthor of this email do not necessarily reflect the views of the By not storing the key press and checking the forceEndTrial box it can be used. Please do not use, copy or disclose the information contained in this The Keyboard component can be used to collect responses from a participant. Message in error, please send it back to me, and immediately delete it. This message and any attachment are intended solely for the addresseeĪnd may contain confidential information. Send an email to post to this group, send email to view this discussion on the web visit. To unsubscribe from this group and stop receiving emails from it, For most experiments this box should be checked.You received this message because you are subscribed to the Google If this box is not checked a keyboard press that has occurred before the start of the checking period will be interpreted as the first keyboard press. discard previous boolĬheck this box to ensure that only key presses that occur during this keyboard checking period are used. Often this correct answer will be defined in the settings of the Loops. textBox The texbox component is very similar to the text stimulus, except that we can make it ‘editable’ You can find the textbox component under the ‘responses’ section of the compontent panel. It is under development, but worth touching on. This is given as Python code that should return True (1) or False (0). PsychoPy now has an editable text box component to get typed responses. ![]() left, 1 or $corrAns (note this should not be in inverted commas). If so then fill in the next box that defines what would constitute a correct answer e.g. store correct boolĬheck this box if you wish to store whether or not this key press was correct. if the keyboard was initiated 2 seconds into the trial and a key was pressed 3.2s into the trials the response time will be recorded as 1.2s). ansSide : str: If ansSide is left, the left video. ansWinOnly : bool: If true, only the correct answer flashing window shows. frequency2 : int: The frequency of SSVEP which will be displayed on the left as the NO response. This time will be taken from the start of keyboard checking (e.g. frequency1 : int: The frequency of SSVEP which will be displayed on the right as the YES response. The response time will also be stored if a keypress is recorded. If the key press is to force the end of the trial then this setting is unlikely to be necessary, unless two keys happen to be pressed in the same video frame. Which key press, if any, should be stored the first to be pressed, the last to be pressed or all that have been pressed. store last key, first key, all keys, nothing To find other special keys, run the Coder Input demo, “what_key.py”, press the key, and check the Coder output window. Cursor control keys can be accessed with ‘up’, ‘down’, and so on the space bar is ‘space’. Note that key names (even for number keys) should be given in single quotes, separated by commas. Only allowed keys count as having been pressed any other key will not be stored and will not force the end of the Routine. If this box is left blank then any key that is pressed will be read. , or the name of a variable holding such a list. allowed keys listĪ list of allowed keys can be specified here, e.g. What information to save, how to lay it out and when to save it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |