# KbQueue for multiple key presses

**URL:** <https://psychtoolbox.discourse.group/t/kbqueue-for-multiple-key-presses/4762>\
**Category:** Programming Help\
**Tags:** windows, experiment-design, timing\
**Created:** [January 1, 2023, 2:06pm UTC](https://psychtoolbox.discourse.group/t/kbqueue-for-multiple-key-presses/4762 "2023-01-01T14:06:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amancari](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@amancari](https://psychtoolbox.discourse.group/u/amancari)\
**Post date:** [January 1, 2023, 2:06pm UTC](https://psychtoolbox.discourse.group/t/kbqueue-for-multiple-key-presses/4762/1 "2023-01-01T14:06:09Z")

</div>

Hello,  
I need to run a task in which I present a series of stimuli and collect multiple key presses (of the same key) in a single trial, to analyze their timing. The stimuli have to be presented continuously and independently of any responses, so I can’t use something like KbWait to get key presses. I thought I could do it with KbQueueCheck, but I understand it would only return the first and last key presses.  
Is there a way to do this while collecting all key presses (with very accurate timing)?

---

<div class="post-metadata">

**Author:** ![dcnieho](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@dcnieho](https://psychtoolbox.discourse.group/u/dcnieho)\
**Post date:** [January 1, 2023, 2:31pm UTC](https://psychtoolbox.discourse.group/t/kbqueue-for-multiple-key-presses/4762/2 "2023-01-01T14:31:41Z")

</div>

KbEventGet is what you need 🙂
