Hi Gary,
Thanks for your explanation. Yes, your reply makes the problem clearer now.
Yes, *229* is actual the Virtual Key value of the WM_KEYDOWN message. In
this scenario, *229* standards for VK_PROCESSKEY based on the Virtual-Key
Codes map below:
"Virtual-Key Codes "
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
I am not sure if you have reviewed my second reply to you, I think the
information I provided in the second reply should address your question.
Actually, only when IME is active, the wParam of the WM_KEYDOWN message will
be VK_PROCESSKEY, it means this is the IME PROCESS key. The actual virtual
key code is not posted to the application at this time.
In your scenario, it is likely when you clicked the IE window, the default
focus will be in certain TextBox in the IE page, while at the same time the
Korean IME is active, so the wParam is VK_PROCESSKEY instead of the actual
key.
Below is more detailed background information regarding how IME does the
trick to generate VK_PROCESSKEY:
When the user presses a key, the system generates a keyboard event. USER.EXE
checks to see whether the currently active input language handle (HKL)
points to an IME. If so, USER.EXE passes the keyboard event to the Input
Method Manager, which passes the event to the IME. If the IME intends to
respond to the keyboard event (for example, when the user presses the
Spacebar to activate the candidate window on Japanese Windows), the IME
translates the keyboard event into the virtual key, VK_PROCESSKEY, which it
passes back to the IMM. The IMM then sends this virtual key to the
application. If the application provides a customized IME user interface, it
can trap VK_PROCESSKEY and call the API ImmGetVirtualKey to translate it
into a more specific virtual key value, and then respond accordingly. For
example, if the virtual key is VK_SPACE, the application would respond by
calling code to paint the candidate window.
Please refer to the article below for more information:
"Full IME Support"
http://www.microsoft.com/globaldev/dis_v1/disv1.asp?DID=dis28d&File=S24B6_f3.asp
So there is no need for your application to respond to WM_KEYDOWN with
VK_PROCESSKEY, since this message is used by IME.
If you still have anything unclear, please feel free to feedback, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support Engineer
within 1 business day is acceptable. Please note that each follow up
response may take approximately 2 business days as the support professional
working with you may need further investigation to reach the most efficient
resolution. The offering is not appropriate for situations that require
urgent, real-time or phone-based interactions or complex project analysis
and dump analysis issues. Issues of this nature are best handled working
with a dedicated Microsoft Support Engineer by contacting Microsoft Customer
Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.