src/events/SDL_keyboard.c
changeset 4529 05ab4141ce93
parent 4490 06c7423f8c60
child 4560 95352c671a6e
child 4755 436183eb30c8
     1.1 --- a/src/events/SDL_keyboard.c	Sat Jul 17 18:44:34 2010 -0700
     1.2 +++ b/src/events/SDL_keyboard.c	Sat Jul 17 18:57:51 2010 -0700
     1.3 @@ -764,6 +764,11 @@
     1.4      SDL_Keyboard *keyboard = &SDL_keyboard;
     1.5      int posted;
     1.6  
     1.7 +    /* Don't post text events for unprintable characters */
     1.8 +    if (*text < ' ') {
     1.9 +        return 0;
    1.10 +    }
    1.11 +
    1.12      /* Post the event, if desired */
    1.13      posted = 0;
    1.14      if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {