# HG changeset patch # User Sam Lantinga # Date 1279418271 25200 # Node ID 05ab4141ce93215599de49e9704d798dabb9dea6 # Parent f06faa886423300d4ae462caad467ca7d7040b0d Fixed bug 1014 Don't send events for unprintable characters diff -r f06faa886423 -r 05ab4141ce93 src/events/SDL_keyboard.c --- a/src/events/SDL_keyboard.c Sat Jul 17 18:44:34 2010 -0700 +++ b/src/events/SDL_keyboard.c Sat Jul 17 18:57:51 2010 -0700 @@ -764,6 +764,11 @@ SDL_Keyboard *keyboard = &SDL_keyboard; int posted; + /* Don't post text events for unprintable characters */ + if (*text < ' ') { + return 0; + } + /* Post the event, if desired */ posted = 0; if (SDL_GetEventState(SDL_TEXTINPUT) == SDL_ENABLE) {