Checking the state of pressed down keys

Have you thought about using XQueryKeymap() to check the state of currently pressed down keys in X11, instead of doing this manually through KeyPress and KeyRelease events?

GLFW handles input via both input callbacks and queries such as glfwGetKey(). The callbacks need event processing, and GLFW then stores the key state in a platform agnostic structure so that the code for glfwGetKey is multi-platform.

So using XQueryKeymap() isn’t required, and adding it would add to the volume of code needed to be maintained. Since we already have the data in GLFW, the current approach is also likely somewhat faster.