# HG changeset patch # User Mike Gorchak # Date 1258728160 0 # Node ID 0cbfec87e4f19ffbab813213769f98a8f5dc98da # Parent 09136f534198766e8ad9b2adf5aad82d8b6285ea Support for UTF-8 text input has been added. diff -r 09136f534198 -r 0cbfec87e4f1 src/video/photon/SDL_photon.c --- a/src/video/photon/SDL_photon.c Fri Nov 20 07:11:29 2009 +0000 +++ b/src/video/photon/SDL_photon.c Fri Nov 20 14:42:40 2009 +0000 @@ -2685,6 +2685,23 @@ SDL_SendKeyboardKey(0, SDL_RELEASED, scancode); } + + } + + /* Handle UTF-8 text input if requested by caller */ + if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) + { + char text[5]; + + SDL_memset(text, 0x00, 5); + if (PhKeyToMb(text, keyevent)!=-1) + { + SDL_SendKeyboardText(0, text); + } + else + { + /* Just do nothing if it is not a UTF-8 character */ + } } } break;