Function Set-Char-Callback

Part of:

package glfw
( set-char-callback < cbfun > )
Parameters
cbfun
Pointer to a callback function that will be called every time a printable character is generated by
the keyboard. The function should have the following C language prototype:
void GLFWCALL functionname( int character, int action );
Where functionname is the name of the callback function, character is a Unicode (ISO 10646)
character, and action is either GLFW_PRESS or GLFW_RELEASE.
If cbfun is NULL, any previously selected callback function will be deselected.
Return values
none
Description
The function selects which function to be called upon a keyboard character event. The callback function
is called every time a key that results in a printable Unicode character is pressed or released. Characters
are affected by modifiers (such as shift or alt).
A window has to be opened for this function to have any effect.
Notes
Character events are recorded continuously, but only reported when glfwPollEvents, glfwWaitEvents
or glfwSwapBuffers is called.
Control characters, such as tab and carriage return, are not reported to the character callback function,
since they are not part of the Unicode character set. Use the key callback function for such events (see
glfwSetKeyCallback).
The Unicode character set supports character codes above 255, so never cast a Unicode character to an
eight bit data type (e.g. the C language ’char’ type) without first checking that the character code is less
than 256. Also note that Unicode character codes 0 to 255 are equal to ISO 8859-1 (Latin 1).