samples/triangle.c
/* Called by GLFW whenever a key is pressed. */
Called by GLFW whenever a key is pressed.
Called by GLFW whenever a key is pressed .
void keyboard(GLFWwindow* window, int key, int scancode, int action, int mods)
{
	if (kuhl_keyboard_handler(window, key, scancode, action, mods))
		return;
	if(action == GLFW_PRESS)
		return;
	if(key == GLFW_KEY_SPACE)
	{
		printf("toggling rotation\n");
		isRotating = !isRotating;
	}
	if(key == GLFW_KEY_H)
		printf("hello world\n");
}
void keyboard ( GLFWwindow * window , int key , int scancode , int action , int mods ) { if ( kuhl_keyboard_handler ( window , key , scancode , action , mods ) ) return ; if ( action == GLFW_PRESS ) return ; if ( key == GLFW_KEY_SPACE ) { printf ( " \n " ) ; isRotating = ! isRotating ; } if ( key == GLFW_KEY_H ) printf ( " \n " ) ; }
Called by GLFW whenever a key is pressed.
Called by GLFW whenever a key is pressed .
/* If the library handles this keypress, return */ /* Action can be press (key down), release (key up), or repeat
	   (key is held down, the delay until the first repeat and the
	   rate at which repeats fire may depend on the OS.)
	   
	   Here, we ignore any press events so the event will only
	   happen when the key is released or it will happen repeatedly
	   when the key is held down.
	*/ /* Custom key handling code below: 
	   For a list of keys, see: https://www.glfw.org/docs/latest/group__keys.html  */