How can I get the duration time of a key press with Psychtoolbox?

5 ビュー (過去 30 日間)
Enrica Gaetano
Enrica Gaetano 2021 年 5 月 6 日
回答済み: Arjun 2025 年 3 月 3 日
I am designing an experiment where subjects have to respond continously at two stimuli which will be presented alternately. They will be respond with two key presses: e.g. "a" for stimulus 1 and "b" for stimulus 2.
I need to know which key is pressed and for how long each key is hold down during each trial.
For the former I can use KbCheck but I don't know how to obtain the latter information.
Can anyone help me, please?
Best.

回答 (1 件)

Arjun
Arjun 2025 年 3 月 3 日
I see that you want to get the time duration for which a key was pressed.
You can refer to the following MATLAB Answers inorder to explore some ways in which it can be done:
I hope this helps!

カテゴリ

Help Center および File ExchangeTiming and presenting 2D and 3D stimuli についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by