Subject: bug#10299: Emacs doesn't handle Unicode characters in keyboard layout on MS Windows

From: Joakim Hårsman <[email-masked]>
Date: Thu, 15 Dec 2011 12:11:18 +0100

Ok, I'll try to build Emacs on Windows and see if I can set a
breakpoint and look at the message Emacs is getting.

On 15 December 2011 11:52, Eli Zaretskii <[email-masked]> wrote:
>> Date: Thu, 15 Dec 2011 08:53:15 +0100
>> From: Joakim Hårsman <[email-masked]>
>> Cc: [email-masked], [email-masked], [email-masked]
>>
>> I really don't know my way around the Emacs source, but a quick look
>> at w32_kbd_patch_key in w32inevt.c seems to indicate that Emacs really
>> is decoding the Unicode character event correctly, both
>> uChar.UnicodeChar and uChar.AsciiChar seem to be set correctly.
>> [...]
>> However, this bit from w32_wnd_proc in w32fns.c looks suspicious to me:
>> [...]
>> It looks like it's re-posting the event with just the Ascii key code,
>> clobbering the Unicode info that's originally in wParam.
>
> I'd begin by establishing what kind of message Emacs gets when you
> type a key created by MKLC.  It could be WM_KEYDOWN, but it could also
> be something else, like WM_UNICHAR.
>
> Can you find that out, either with a debugger or with some other tool?
> If you can, please show the parameters of the message sent to Emacs.
> Then we can continue tracing the code execution from there.
>
> Note that Emacs has a separate thread that reads the Windows events,
> and that thread then passes the events to the main thread, where the
> event undergoes several levels of processing.  It's a complicated
> issue, so we had better established from the get-go what kind of input
> are we processing.