mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Added a conservative set of key modifiers.
This commit is contained in:
+2
-2
@@ -211,13 +211,13 @@ static void animate(void)
|
||||
|
||||
|
||||
/* change view angle, exit upon ESC */
|
||||
void key( GLFWwindow* window, int k, int action )
|
||||
void key( GLFWwindow* window, int k, int action, int mods )
|
||||
{
|
||||
if( action != GLFW_PRESS ) return;
|
||||
|
||||
switch (k) {
|
||||
case GLFW_KEY_Z:
|
||||
if( glfwGetKey( window, GLFW_KEY_LEFT_SHIFT ) )
|
||||
if( mods & GLFW_MOD_SHIFT )
|
||||
view_rotz -= 5.0;
|
||||
else
|
||||
view_rotz += 5.0;
|
||||
|
||||
Reference in New Issue
Block a user