src/SDL_compat.c
branchSDL-1.3
changeset 1687 d36048e8e302
parent 1686 8d7fecceb9ef
child 1691 c901fd2a42da
--- a/src/SDL_compat.c	Sun Jun 18 13:47:19 2006 +0000
+++ b/src/SDL_compat.c	Sun Jun 18 13:54:27 2006 +0000
@@ -208,12 +208,13 @@
         {
             Uint32 unicode = 0;
             if (event->key.type == SDL_KEYDOWN && event->key.keysym.sym < 256) {
-                int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
-                int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
-                if ((shifted ^ capslock) != 0) {
-                    unicode = SDL_toupper(event->key.keysym.sym);
-                } else {
-                    unicode = event->key.keysym.sym;
+                unicode = event->key.keysym.sym;
+                if(unicode >= 'a' && unicode <= 'z') {
+                    int shifted = !!(event->key.keysym.mod & KMOD_SHIFT);
+                    int capslock = !!(event->key.keysym.mod & KMOD_CAPS);
+                    if ((shifted ^ capslock) != 0) {
+                        unicode = SDL_toupper(unicode);
+                    }
                 }
             }
             if (unicode) {