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

2.3.2.2 Get Timed Key Response (#C)

The Get Timed Key Response pauses Cogsys until the subject presses a key. If no character is pressed within a given timelimit, TIMEUP_RESP_CHAR is written as the key pressed. Either way, the Cogsys response key and response time variable are updated.

If the BREAKOUT_CHAR key is pressed, the experiment is terminated.

Name:
Get Timed Key Response
Class:
Direct Keyboard Input
Code:
#C
Syntax:
#Climit

limit is a timelimit

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. If the timelimit limit is reached before a key is pressed, TIMEUP_RESP_CHAR is written as the key pressed, and limit as the time.
Breakout:
YES

Test Files:
`TKYR_T01.IN'
tests basic operation

Examples:

input
Press a key within 5 seconds: #C5000
cogsys
Displays the text and waits up to 5 seconds.
subject
Press the z key after 200 milliseconds.
output
z200
input
Press a key within 5 seconds: #C5000
cogsys
Displays the text and waits up to 5 seconds.
subject
Does nothing.
output
&5000



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