@@ -930,7 +930,10 @@ void MCPlatformHandleTextInputInsertText(MCPlatformWindowRef p_window, unichar_t
930930 t_char[1 ] = 0 ;
931931
932932 MCAutoStringRef t_string;
933- if (s_pending_key_down -> next && MCUnicodeMapToNative (p_chars, 1 , t_char[0 ]))
933+ // SN-2015-01-20: [[ Bug 14406 ]] If we have a series of pending keys, we have two possibilities:
934+ // - typing IME characters: the characters are native, so we use the finsertnew
935+ // - typing dead characters: the character, if we arrive here, is > 127
936+ if (*p_chars > 127 && s_pending_key_down -> next && MCUnicodeMapToNative (p_chars, 1 , t_char[0 ]))
934937 {
935938 MCStringCreateWithNativeChars ((const char_t *)t_char, 1 , &t_string);
936939 MCdispatcher -> wkdown (p_window, *t_string, *t_char);
@@ -948,7 +951,9 @@ void MCPlatformHandleTextInputInsertText(MCPlatformWindowRef p_window, unichar_t
948951 // then that's not a combining char - and it deserves its (raw)Key(Down|Up) messages
949952 uint32_t t_codepoint;
950953 t_codepoint = MCStringGetCodepointAtIndex (*t_string, 0 );
951- if (p_char_count == 1 && MCUnicodeIsAlnum (t_codepoint))
954+
955+ // SN-2015-01-20: [[ Bug 14406 ]] Same as above: *p_chars > 127 means that we are in IME.
956+ if (*p_chars > 127 && p_char_count == 1 && MCUnicodeIsAlnum (t_codepoint))
952957 {
953958 MCAutoStringRef t_mapped_char;
954959 MCPlatformKeyCode t_mapped_key_code;
0 commit comments