# GLFW\_REPEAT not triggering when glfwSwapBuffers() is repeatedly called

**URL:** <https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975>\
**Category:** support\
**Created:** [November 25, 2025, 1:01pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975 "2025-11-25T13:01:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skuhl](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/skuhl/32/1056_2.png) [@skuhl](https://discourse.glfw.org/u/skuhl)\
**Post date:** [November 25, 2025, 1:01pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975/1 "2025-11-25T13:01:33Z")

</div>

I am using Ubuntu 25.10 with wayland and am having trouble getting the key callback to receive a GLFW\_REPEAT action. I have confirmed the problem with Ubuntu’s GLFW 3.4 package, compiling 3.4 from source, and GLFW git. I eventually discovered that test/events.c shows the repeat events and does not have the same problem. However, I couldn’t get examples/triangle-opengl.c to print a message after modifying it’s key callback to print a message when action==GLFW\_REPEAT.

After trying to figure out the difference between the two programs, I learned how to make tests/events.c have the problem: Call glfwSwapBuffers() in the loop immediately above the glfwWindowShouldClose() if statement.

Is this a GLFW bug or some issue perhaps caused by my environment?

---

<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:** [November 25, 2025, 2:27pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975/2 "2025-11-25T14:27:10Z")

</div>

I recently modified the GLFW code handling for`GLFW_REPEAT`. Whilst this may not fix your issue could you test the latest code from Github and let me know here?

---

<div class="post-metadata">

**Author:** ![skuhl](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/skuhl/32/1056_2.png) [@skuhl](https://discourse.glfw.org/u/skuhl)\
**Post date:** [November 25, 2025, 2:34pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975/3 "2025-11-25T14:34:49Z")

</div>

Yes, it happens with GLFW git as well. I’ve confirmed it on two Ubuntu 25.10 machines, both with nvidia cards.

---

<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:** [November 25, 2025, 4:43pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975/4 "2025-11-25T16:43:56Z")

</div>

Thanks, if you able to report this as a bug on Github that would be great, otherwise I will.

Hopefully I’ll be able to replicate this with Ubuntu, though I don’t have a NVIDIA GPU with me at the moment (hopefully this shouldn’t matter).

Do you know if you are running with X11 or Wayland platform, and does the issue occur on the other? See the [runtime platform selection docs](https://www.glfw.org/docs/latest/intro_guide.html#platform) for more info on this.

---

<div class="post-metadata">

**Author:** ![skuhl](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/skuhl/32/1056_2.png) [@skuhl](https://discourse.glfw.org/u/skuhl)\
**Post date:** [November 25, 2025, 6:23pm UTC](https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975/5 "2025-11-25T18:23:00Z")

</div>

> <https://github.com/glfw/glfw/issues/2793>
>
> I am using Ubuntu 25.10 with wayland and am having trouble getting the key callb…ack to receive a GLFW\_REPEAT action. I have confirmed the problem with Ubuntu’s GLFW 3.4 package, compiling 3.4 from source, and GLFW git. I eventually discovered that test/events.c shows the repeat events and does not have the same problem. However, I couldn’t get examples/triangle-opengl.c to print a message after modifying it’s key callback to print a message when action==GLFW\_REPEAT.
> 
> After trying to figure out the difference between the two programs, I learned how to make tests/events.c have the problem: Call glfwSwapBuffers() in the loop immediately above the glfwWindowShouldClose() if statement.
> 
> I have found that I can make the problem go away by either:
> 1. Adding glfwInitHint(GLFW\_PLATFORM, GLFW\_PLATFORM\_X11); before glfwInit() in events.c
> 2. Switching to the nouveau driver (instead of nvidia-driver-580-open)
> 
> I have confirmed that the problem happens on two different Ubuntu 25.10 machines, both with nvidia cards. However, I haven't tested with other cards.
> 
> Forum discussion: https://discourse.glfw.org/t/glfw-repeat-not-triggering-when-glfwswapbuffers-is-repeatedly-called/2975

I added a couple of notes about two ways I am able to get the repeated keys to get sent to the callback: Force X11 platform or use the nouveau driver.
