There is a code written in Java :
public class KeyCallback extends GLFWKeyCallback { public static final boolean[] keys = new boolean[65536]; @Override public void invoke(long window, int key, int scancode, int action, int mods) { keys[key] = action != GLFW.GLFW_RELEASE; } } How to write the same thing, only in C ++ ?