Reputation: 910
We are having trouble with the usage of Windows Chinese Bopomofo keyboard in our App in an RTF control. (that is a different story now)
I am debugging, and noticed while the Bopomofo keyboard is in "edit mode" (cannot describe better, the scenario when the Chinese word?letter? is not "committed"), pressing for example 'c' key will result in the following keydown/up events:
richTextBox1_KeyDown: e.KeyCode=ProcessKey / e.KeyData=ProcessKey / e.KeyValue=229 / e.Modifiers=None / e.SuppressKeyPress=False
richTextBox1_KeyUp: e.KeyCode=C / e.KeyData=C / e.KeyValue=67 / e.Modifiers=None / e.SuppressKeyPress=False / e.Modifiers=None / e.Handled=False
So pressing 'c' means keyDown = ProcessKey , keyUp = C in the above scenario.
I was searching, but no result. What is the ProcessKey
?
Forms.Keys
says only:
//
// Summary:
// The PROCESS KEY key.
ProcessKey = 229,
Upvotes: 1
Views: 767
Reputation: 910
Ok, so this is when you use IME to enter text.
Might be interesting for others as well:
https://learn.microsoft.com/en-us/windows/win32/learnwin32/keyboard-input
Users can also install an Input Method Editor (IME) to enter complex scripts,
such as Japanese characters, with a standard keyboard.
For example, using a Japanese IME to enter the katakana character カ (ka),
you might get the following messages:
WM_KEYDOWN: VK_PROCESSKEY (the IME PROCESS key)
WM_KEYUP: 0x4B
WM_KEYDOWN: VK_PROCESSKEY
WM_KEYUP: 0x41
WM_KEYDOWN: VK_PROCESSKEY
WM_CHAR: カ
WM_KEYUP: VK_RETURN
Also some useful info here:
https://learn.microsoft.com/en-us/windows/win32/api/immdev/nf-immdev-immgetvirtualkey
Upvotes: 1