Simple Directmedia Layer
Go to file
Sam Lantinga 3a08b46336 Fixed bug 2834 - Patch to support dead keys on Windows
Elise Maurer

When inputting text, dead-keys are currently not handled correctly on Windows with the latest SDL2 tip as well as the 2.0.3 release.

Using a French AZERTY keyboard, when I type the `^` key followed by `e` key to compose the `` character, I erroneously get two SDL_TEXTINPUT events, one with the `^` character and one with the `e` character.

I've looked at the history for SDL_windowsevents.c and there's been some back-and-forth with several methods for handling text input:

  * r8142 removed any handling of WM_CHAR because keyboard input was being handled through WM_KEYDOWN along with ToUnicode since r7645.

  * But using ToUnicode actually breaks dead-keys (googling for "ToUnicode dead keys" reports many horror stories of people trying to work around that and failing).

  * It seems like r7645 introduced a double-fix: it fixed WM_CHAR to properly handle Unicode, and also (unnecessarily?) added text input handling to WM_KEYDOWN. Later, r8142 removed the WM_CHAR stuff instead of the WM_KEYDOWN stuff.

The attached patch restores handling of text input through WM_CHAR and removes it from WM_KEYDOWN. I've tested it with French, English and Russian layouts and it seems to do its job. Obviously, with such matters, it's still a risky change.
2015-06-25 11:49:48 -07:00
acinclude Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
android-project Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
build-scripts Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
cmake Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
debian Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
docs Updated Mac OS X documentation for fatbuilt.sh -> gcc-fat.sh transition. 2015-06-22 21:30:08 -04:00
include Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
premake Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
src Fixed bug 2834 - Patch to support dead keys on Windows 2015-06-25 11:49:48 -07:00
test Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
VisualC Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
VisualC-WinRT Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
visualtest Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Xcode Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Xcode-iOS Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
.hgignore Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Android.mk Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
autogen.sh Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
BUGS.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
cmake_uninstall.cmake.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
CMakeLists.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
configure Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
configure.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
COPYING.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
CREDITS.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
INSTALL.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.minimal Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.pandora Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.psp Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.wiz Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
README-SDL.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
README.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sdl2-config.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sdl2.m4 Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sdl2.pc.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL2.spec.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
TODO.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
VisualC.html Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
WhatsNew.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
http://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)