# Missed key response

**URL:** <https://discourse.psychopy.org/t/missed-key-response/22807>\
**Category:** Coding\
**Tags:** timing\
**Created:** [May 6, 2021, 5:55am UTC](https://discourse.psychopy.org/t/missed-key-response/22807 "2021-05-06T05:55:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![daohua.zhang](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@daohua.zhang](https://discourse.psychopy.org/u/daohua.zhang)\
**Post date:** [May 6, 2021, 5:55am UTC](https://discourse.psychopy.org/t/missed-key-response/22807/1 "2021-05-06T05:55:56Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/6/9/696db57a43d378d8cc163978816fd78a660ef367.png)

---

<div class="post-metadata">

**Author:** ![daohua.zhang](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@daohua.zhang](https://discourse.psychopy.org/u/daohua.zhang)\
**Post date:** [May 6, 2021, 6:04am UTC](https://discourse.psychopy.org/t/missed-key-response/22807/2 "2021-05-06T06:04:06Z")

</div>

Hey everyone, i have a problem. I want to present target stimuli for 300ms, and also record the response time shorter than 300ms. if i use this code, i cannot record the reaction time during 320ms to 336ms since fixation.draw() spend 0.016s.

---

<div class="post-metadata">

**Author:** ![daohua.zhang](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@daohua.zhang](https://discourse.psychopy.org/u/daohua.zhang)\
**Post date:** [May 6, 2021, 6:06am UTC](https://discourse.psychopy.org/t/missed-key-response/22807/3 "2021-05-06T06:06:51Z")

</div>

Dose anybody know how to resolve this problem?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [May 6, 2021, 7:37am UTC](https://discourse.psychopy.org/t/missed-key-response/22807/4 "2021-05-06T07:37:16Z")

</div>

How can keys ever be None just after a waitKeys call?

Sorry, I just spotted the max wait parameter.

---

<div class="post-metadata">

**Author:** ![sol](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/sol/32/15018_2.png) [@sol](https://discourse.psychopy.org/u/sol)\
**Post date:** [May 11, 2021, 12:30pm UTC](https://discourse.psychopy.org/t/missed-key-response/22807/5 "2021-05-11T12:30:24Z")

</div>

Try adding `clearEvents=False` to the second call to `event.waitKeys(...)`.
