Welcome! Log In Create A New Profile

Advanced

Count/Timing of key presses

Posted by bsc1 
Count/Timing of key presses
November 22, 2021 03:35PM
Hi,

I do not understand if I can check for multiple key presses within a trial. It appears I can see the first press, and the time it occurred but later key presses do not seem to be recognized?

I can see the .Count increment to 2, but it never goes higher.

Also seems like I should be able to see times when later presses occur, but the .Time only allows first entry.

Any suggestions?

Thanks
Attachments:
open | download - KeyCount1.m (873 bytes)
Re: Count/Timing of key presses
November 23, 2021 02:23AM
Your scene is designed to end immediately after one key stroke. If that is not what you intended, rewrite the script.

It looks as if you got two strokes because you inserted the same KeyChecker in two adapter chains in the same scene. So it was evaluated twice.

It was my fault that the .Time kept only one number. Please download the package again. After updating your NIMH ML, try the attached example.
Attachments:
open | download - KeyCount1.m (522 bytes)
Re: Count/Timing of key presses
November 24, 2021 09:24AM
Thanks for you help!

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.