Fixed key names in the example and test programs.

This commit is contained in:
Marcus
2011-01-03 22:22:14 +01:00
parent 3b0084799c
commit e3cb563a28
13 changed files with 24 additions and 24 deletions

View File

@@ -608,7 +608,7 @@ int main( void )
glfwPollEvents();
/* Check if we are still running */
running = glfwIsWindow(window) && !glfwGetKey( window, GLFW_KEY_ESC );
running = glfwIsWindow(window) && !glfwGetKey( window, GLFW_KEY_ESCAPE );
}
while( running );

View File

@@ -220,13 +220,13 @@ void key( GLFWwindow window, int k, int action )
if( action != GLFW_PRESS ) return;
switch (k) {
case 'Z':
if( glfwGetKey( window, GLFW_KEY_LSHIFT ) )
case GLFW_KEY_Z:
if( glfwGetKey( window, GLFW_KEY_LEFT_SHIFT ) )
view_rotz -= 5.0;
else
view_rotz += 5.0;
break;
case GLFW_KEY_ESC:
case GLFW_KEY_ESCAPE:
running = 0;
break;
case GLFW_KEY_UP:

View File

@@ -497,7 +497,7 @@ static void key_callback(GLFWwindow window, int key, int action)
{
switch(key)
{
case GLFW_KEY_ESC:
case GLFW_KEY_ESCAPE:
/* Exit program on Escape */
running = GL_FALSE;
break;

View File

@@ -493,7 +493,7 @@ int main(void)
} // Check if the ESC key was pressed or the window was closed
while (glfwIsWindow(window) &&
glfwGetKey(window, GLFW_KEY_ESC) != GLFW_PRESS);
glfwGetKey(window, GLFW_KEY_ESCAPE) != GLFW_PRESS);
// Close OpenGL window and terminate GLFW
glfwTerminate();

View File

@@ -83,7 +83,7 @@ int main(void)
} // Check if the ESC key was pressed or the window was closed
while (glfwIsWindow(window) &&
glfwGetKey(window, GLFW_KEY_ESC) != GLFW_PRESS);
glfwGetKey(window, GLFW_KEY_ESCAPE) != GLFW_PRESS);
// Close OpenGL window and terminate GLFW
glfwTerminate();

View File

@@ -262,7 +262,7 @@ void key_callback(GLFWwindow window, int key, int action)
switch (key)
{
case GLFW_KEY_ESC:
case GLFW_KEY_ESCAPE:
running = 0;
break;
case GLFW_KEY_SPACE:
@@ -280,11 +280,11 @@ void key_callback(GLFWwindow window, int key, int action)
case GLFW_KEY_DOWN:
beta += 5;
break;
case GLFW_KEY_PAGEUP:
case GLFW_KEY_PAGE_UP:
if (zoom > 1)
zoom -= 1;
break;
case GLFW_KEY_PAGEDOWN:
case GLFW_KEY_PAGE_DOWN:
zoom += 1;
break;
default: