diff -r 817656bd36ec src/video/windows/SDL_windowsevents.c --- a/src/video/windows/SDL_windowsevents.c Mon Jan 05 01:41:42 2015 -0500 +++ b/src/video/windows/SDL_windowsevents.c Tue Jan 06 01:31:05 2015 +0100 @@ -552,20 +552,6 @@ SDL_SendKeyboardKey(SDL_PRESSED, code); } } - if (msg == WM_KEYDOWN) { - BYTE keyboardState[256]; - char text[5]; - UINT32 utf32 = 0; - - GetKeyboardState(keyboardState); - if (ToUnicode(wParam, (lParam >> 16) & 0xff, keyboardState, (LPWSTR)&utf32, 1, 0) > 0) { - WORD repetition; - for (repetition = lParam & 0xffff; repetition > 0; repetition--) { - WIN_ConvertUTF32toUTF8(utf32, text); - SDL_SendKeyboardText(text); - } - } - } returnCode = 0; break; @@ -595,8 +581,18 @@ break; case WM_UNICHAR: + if (wParam == UNICODE_NOCHAR) { + returnCode = 1; + break; + } + // no break case WM_CHAR: - /* Ignore WM_CHAR messages that come from TranslateMessage(), since we handle WM_KEY* messages directly */ + { + char text[5]; + + WIN_ConvertUTF32toUTF8(wParam, text); + SDL_SendKeyboardText(text); + } returnCode = 0; break;