The window whose callback to set.
The new callback, or null to remove the currently set callback.
The previously set callback, or null if no callback was set or the library had not been initialized.
@callback_signature
void function_name(GLFWwindow* window, unsigned int codepoint)
For more information about the callback parameters, see the function pointer type.
Errors: Possible errors include @ref GLFW_NOT_INITIALIZED.
This function must only be called from the main thread.
@sa @ref input_char
Added in version 2.4. @glfw3 Added window handle parameter and return value.
Ingroup: input
Sets the Unicode character callback.
This function sets the character callback of the specified window, which is called when a Unicode character is input.
The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas the key callback is not. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was pressed or released, see the key callback instead.
The character callback behaves as system text input normally does and will not be called if modifier keys are held down that would prevent normal text input on that platform, for example a Super (Command) key on macOS or Alt key on Windows.