sdl2_frt/src/video
Sam Lantinga b4b12d950e Fixed bug 1876 - SDL_TEXTINPUT only returns '?' (0x3F) in event.text.text with Khmer language input
Andreas

The issue comes down to this line on MSDN:
"TranslateMessage produces WM_CHAR messages only for keys that are mapped to ASCII characters by the keyboard driver."

"WM_KEYDOWN and WM_KEYUP combinations produce a WM_CHAR or WM_DEADCHAR message. WM_SYSKEYDOWN and WM_SYSKEYUP combinations produce a WM_SYSCHAR or WM_SYSDEADCHAR message."
Except for WM_CHAR, none of these messages are used in SDL. Hence TranslateMessage should be dropped entirely and proper handling be included in the WM_KEYDOWN event.
Currently TranslateMessage is called for every message even if it must not be called in certain cases (like "An application should not call TranslateMessage if the TranslateAccelerator function returns a nonzero value.").

WM_CHAR message handling should remain for external processes posting these messages - additionally, WM_UNICHAR should be added.

I made a patch for src/video/windows/SDL_windowsevents.c that seems to work fine. It doesn't solve the "missing" composition for Khmer, but at least input for languages that cannot be mapped to ASCII characters (and for which IME is not used) will now work on Windows.
2013-08-16 15:35:10 -07:00
..
android Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
bwindow Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
cocoa Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows. 2013-08-12 11:09:13 -07:00
directfb Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
dummy Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
pandora Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
psp Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
uikit Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
windows Fixed bug 1876 - SDL_TEXTINPUT only returns '?' (0x3F) in event.text.text with Khmer language input 2013-08-16 15:35:10 -07:00
x11 Don't print "unrecognized key" message for an X11 keycode of 0. This can happen with composed characters. 2013-08-12 22:00:21 -07:00
SDL_blit_0.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_1.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_A.c Fixed alpha composition when destination alpha is transparent. 2013-08-16 09:20:33 -07:00
SDL_blit_auto.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_auto.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_copy.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_copy.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_N.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_slow.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit_slow.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_blit.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_bmp.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_clipboard.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_fillrect.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_pixels_c.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_pixels.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_rect_c.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_rect.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_RLEaccel_c.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_RLEaccel.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_shape_internals.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_shape.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_stretch.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_surface.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_sysvideo.h Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
SDL_video.c Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00
sdlgenblit.pl Fixes #2022, do not resume on Android when surfaceChanged 2013-08-12 11:13:50 -03:00