src/SDL_compat.c
branchSDL-1.3
changeset 1687 d36048e8e302
parent 1686 8d7fecceb9ef
child 1691 c901fd2a42da
     1.1 --- a/src/SDL_compat.c	Sun Jun 18 13:47:19 2006 +0000
     1.2 +++ b/src/SDL_compat.c	Sun Jun 18 13:54:27 2006 +0000
     1.3 @@ -208,12 +208,13 @@
     1.4          {
     1.5              Uint32 unicode = 0;
     1.6              if (event->key.type == SDL_KEYDOWN && event->key.keysym.sym < 256) {
     1.7 -                int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
     1.8 -                int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
     1.9 -                if ((shifted ^ capslock) != 0) {
    1.10 -                    unicode = SDL_toupper(event->key.keysym.sym);
    1.11 -                } else {
    1.12 -                    unicode = event->key.keysym.sym;
    1.13 +                unicode = event->key.keysym.sym;
    1.14 +                if(unicode >= 'a' && unicode <= 'z') {
    1.15 +                    int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
    1.16 +                    int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
    1.17 +                    if ((shifted ^ capslock) != 0) {
    1.18 +                        unicode = SDL_toupper(unicode);
    1.19 +                    }
    1.20                  }
    1.21              }
    1.22              if (unicode) {