glfwSetCharModsCallback¶
This function sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys are used.
The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see the character callback.
Example:
glfwSetCharModsCallback($window, function($codepoint, $mods) {
echo "Character: " . mb_chr($codepoint) . ' with mods: ' . $mods .
PHP_EOL;
});
- arguments
-
\GLFWwindow
$window
The window whose callback to set.callable
$callback
- returns
-
void