Search code examples
c++x11xlibautorepeat

X11 Key held down leads to key pressed and released


How can I stop the KeyRelease event being spammed when I hold down a key on the keyboard?

I've searched the internet and found people suggesting putting a timer in the loop but I want a more efficient way.

Isn't there something in X11 that can turn the autorepeat off?


Solution

  • I found the solution, I can use

    XAutoRepeatOff(Display* display);