Discussion:
IME focus lost during Korean character composition
(too old to reply)
JPG
2010-03-04 12:30:01 UTC
Permalink
Hi,
I’m creating a virtual keyboard that works in Korea and I’m having one
particular issue.

From the beginning, I created a basic app and this works for every other
language other than Korea. If you type the letters DKS via keyboard it
constructs a single character, but if you try this using my app, it breaks
the characters up.

I can only assume this was down to focus and I spent a long time reviewing
messages from various apps/system but I can’t see anything obvious.

Following message trail comes out when you use the actual keyboard:

WM_KEY_DOWN – VK_PROCESSKEY , for the first character
WM_IME_STARTCOMPOSITION - IME kicks in and starts the composition process
..
WM_KEY_UP … for the first character

WM_KEY_DOWN VK_PROCESSKEY, for the second character
WM_IME_NOTIFY/COMPOSITION – updating the contents/IME window
WM_KEY_UP … for the second character

Etc

If I try this via the virtual keyboard, it suddenly appears with WM_KEY_UP –
VK_PROCESSKEY with a zero scan code.
This tears down the IME composition stopping character construction.

I’ve no idea where this KEY_UP code is coming from as it certainly isn’t my
application.

At first I thought I started off with the usual suspects by:
1) Altering the window construct (CreateParams) and adding WS_EX_NOACTIVATE
(extended parameter).
2) I also picked up on the WM_MOUSEACTIVATE command and respond with
MA_NOACTIVATE;

This helped the keyboard work for all other systems, except Korean.

The only way I can get this to work is code a MFC Dialog app with ‘No
Activate’ switched on within the Dialog.

This is nice to know, but I’m hoping someone out there can explain or
provide a solution?
HL
2010-05-27 21:36:51 UTC
Permalink
Hi JPG

I've a some what similar problem with IME on win CE 6.0 R3. It works with a
regular keyboard but when using a virtual keyboard on screen (same on same
window as the edit field) the IME breaks.
First key gets translated like this:
WM_KEY_DOWN with VK_PROCESSKEY
WM_IME_STARTCOMPOSITION
...
WM_KEY_UP with the right virtual key code

but on the second key, I get:

WM_IME_KEYLAST/WM_IME_COMPOSITION
WM_IME_ENDCOMPOSITION
WM_KEY_DOWN with VK_PROCESSKEY
and etc. (all over)

But in Japanese there are multiple characters in one for example “sa”
becomes one. That's not possible with the above.

Have you found a solution on your above? If you've can you post it?
Loading...