[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.2.1 Get Key Response (#R)

The Get Key Response is the classic response command. It pauses Cogsys until the subject presses a key. It then writes the key pressed and the reaction time in milliseconds to output, followed by a newline. It updates Cogsys variables COGVAR_KEY and COGVAR_TIME with the key and time, respectively.

Like most response commands, Get Key Response will terminate execution of the experiment if the BREAKOUT_CHAR key is entered.

Name:
Get Key Response
Class:
Direct Keyboard Input
Code:
#R
Syntax:
#R
System:
Cogsys variable (COGVAR_KEY) is updated with the key pressed. Cogsys variable (COGVAR_TIME) is updated with the reaction time.
Output:
The key pressed and time are written to output.
Breakout:
YES
Test Files:
`KEYR_T01.IN'
tests basic operation

Examples:

input
#R
subject
Presses the z key after 200 milliseconds.
output
z200



This document was generated by Usman Muzaffar on June, 28 2000 using texi2html