Use Ctrl modifier for window resize key bindings
authorSam Lantinga <slouken@libsdl.org>
Wed, 03 Oct 2012 13:39:42 -0700
changeset 6544c03db4864789
parent 6543 44a83e1a48f9
child 6545 01216d38e4d9
child 6547 38bc368a3b87
Use Ctrl modifier for window resize key bindings
test/common.c
     1.1 --- a/test/common.c	Wed Oct 03 13:38:22 2012 -0700
     1.2 +++ b/test/common.c	Wed Oct 03 13:39:42 2012 -0700
     1.3 @@ -1100,7 +1100,9 @@
     1.4                  }
     1.5              }
     1.6              break;
     1.7 -        case SDLK_EQUALS: {
     1.8 +        case SDLK_EQUALS:
     1.9 +            if (event->key.keysym.mod & KMOD_CTRL) {
    1.10 +                /* Ctrt-+ double the size of the window */
    1.11                  SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
    1.12                  if (window) {
    1.13                      int w, h;
    1.14 @@ -1109,7 +1111,9 @@
    1.15                  }
    1.16              }
    1.17              break;
    1.18 -        case SDLK_MINUS: {
    1.19 +        case SDLK_MINUS:
    1.20 +            if (event->key.keysym.mod & KMOD_CTRL) {
    1.21 +                /* Ctrt-- double the size of the window */
    1.22                  SDL_Window *window = SDL_GetWindowFromID(event->key.windowID);
    1.23                  if (window) {
    1.24                      int w, h;