# GLFW\_RELEASE events missing

**URL:** <https://discourse.glfw.org/t/glfw-release-events-missing/2365>\
**Category:** support\
**Created:** [April 21, 2023, 8:52am UTC](https://discourse.glfw.org/t/glfw-release-events-missing/2365 "2023-04-21T08:52:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjaminhampe](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@benjaminhampe](https://discourse.glfw.org/u/benjaminhampe)\
**Post date:** [April 21, 2023, 8:52am UTC](https://discourse.glfw.org/t/glfw-release-events-missing/2365/1 "2023-04-21T08:52:01Z")

</div>

Dont know why i have to find this issue.

When i fill a vector\< bool \> m\_keys;

if ( action == GLFW\_PRESS ) m\_keys[key] = true;  
else if ( action == GLFW\_RELEASE) m\_keys[key] = false;

then it goes out of sync in short amount of time,  
meaning release events are missing and the m\_keys never bevomes false agains.

Which iks kinda a big kick in the nuts when using the keyboard as an music instrument and the notes never stop playing.

I rather stop using GLFW right now, because of unexpected Kindergarten.

Have fun.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [April 21, 2023, 10:46am UTC](https://discourse.glfw.org/t/glfw-release-events-missing/2365/2 "2023-04-21T10:46:33Z")

</div>

It sounds like you might have a bug in your code, but if you’d like to check if GLFW’s key processing has an issue you should run the [events.c test code included with GLFW](https://github.com/glfw/glfw/blob/master/tests/events.c).

If you need help with your code the best way to do this is to make a simplified code sample available on somewhere like Github and link to it, or paste a small working single file sample in your reply.

Note that you don’t need to maintain your own array of key states as you can use [glfwGetKey( GLFWwindow\* window, int key )](https://www.glfw.org/docs/3.3/group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2) to get the state of a particular key for a given window.

I would also recommend reading the Input Guide:  
[https://www.glfw.org/docs/3.3/input\_guide.html](https://www.glfw.org/docs/3.3/input_guide.html)
