Use Ctrl modifier for window resize key bindings
authorSam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 13:39:42 -0700
changeset 6544 c03db4864789
parent 6543 44a83e1a48f9
child 6545 01216d38e4d9
child 6547 38bc368a3b87
Use Ctrl modifier for window resize key bindings
test/common.c
--- a/test/common.c	Wed Oct 03 13:38:22 2012 -0700
+++ b/test/common.c	Wed Oct 03 13:39:42 2012 -0700
@@ -1100,7 +1100,9 @@
                 }
             }
             break;
-        case SDLK_EQUALS: {
+        case SDLK_EQUALS:
+            if (event->key.keysym.mod & KMOD_CTRL) {
+                /* Ctrt-+ double the size of the window */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     int w, h;
@@ -1109,7 +1111,9 @@
                 }
             }
             break;
-        case SDLK_MINUS: {
+        case SDLK_MINUS:
+            if (event->key.keysym.mod & KMOD_CTRL) {
+                /* Ctrt-- double the size of the window */
                 SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
                 if (window) {
                     int w, h;