[1/4] imm32: Reconstruct the ImmProcessKey,ImmTranslateMessage for the VK_PROCESSKEY

ByeongSik Jeon bsjeon at hanmail.net
Thu Apr 24 03:39:34 CDT 2008


* What is the VK_PROCESSKEY?

http://www.tech-archive.net/Archive/Development/microsoft.public.win32.programmer.kernel/2006-09/msg00324.html

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.

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. 

---
 dlls/imm32/imm.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 75457943e1011e54420845c372f0612ed3e43097.diff
Type: text/x-patch
Size: 1410 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080424/b44dba12/attachment.bin 


More information about the wine-patches mailing list