In an psychological experiment you will generally want to record a participant's responses. This is where the keyboard_response item comes in.
You can set the following options:
Correct response is the name of the expected response. Usually you will set the correct_response variable elsewhere (e.g., in a loop item) and you can leave this field empty.
Allowed responses is a semicolon-separated list of keys that are accepted, e.g., 'a;b;/'.
Timeout contains a maximum response time in milliseconds or 'infinite' for no timeout.
The keyboard_response item sets a number of variables based on your response.
response is the name of the response key.
response_time is the time between the start of the response interval and the response.
correct is 1 if the response matches the correct_response and 0 otherwise.
avg_rt / average_response_time is the average response time since the last feedback item.
acc / accuracy is the average percentage of correct responses since the last feedback item.
You can find a list of valid key names under the ASCII column of this page <http://www.pygame.org/docs/ref/key.html>.