Q:

Special key input not working (Enter, backspace, tab etc)

My keypress code works for all keyboard letters but not for keys like Enter or Tab.
glfwSetCharCallback(window, character_callback);

void character_callback(GLFWwindow* window, unsigned int codepoint)
{
    char c = codepoint;
    printf("%c", c);
}

The function isn't even run when I press Tab or Enter but it does work for the Space bar, how would I go about receiving all key presses?

A:

You should use glfwSetKeyCallback, not glfwSetCharCallback, since you're interested in keys instead of characters. See the Keyboard Input docs and the list of keyboard key macros.
I'm not sure though why Tab and Enter don't produce characters: they would normally produce respectively 0x09 and 0x0d in other toolkits (e.g. freeglut and Qt). But apparently, it's the way GLFW wants it to be, see their issue Backspace not reported to character callbacks:

elmindreda commented on Apr 12, 2017 •
Use the key callback for keys like Enter and Backspace. It provides press, repeat and release events.

