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?
I found the solution, I can use
XAutoRepeatOff(Display* display);