Windows IME: custom Korean virtual keyboard

夙愿已清 提交于 2019-12-23 12:47:58

问题


I have problem with Korean Windows IME. I am designing a virtual (screen/software) keyboard for a piece of embedded software. I rely on Windows IME and it seemed to work fine for Japanese and Chinese languages. It also works perfectly with Korean if I am using a physical keyboard.

But when I click a virtual keyboard button, the mouse events seem to interfere with IME and basically just cancel the composition. WM_IME_ENDCOMPOSITION message fires every time the mouse button is clicked. As a result I can only get separate Korean symbols without an ability to combine them into words.

Is anyone aware of any way to manage this effect? How does the default Windows software keyboard bypass it? For a list of reasons we cannot use default Windows soft keyboard in our product and need to design our own one.

Thank you.


回答1:


The composition ending is caused by keyboard message VK_ProcessKey. You can see this message after you clicked the virtual key by the spy++.

Consider to hook a function used to filter this message by Windows API SetWindowsHookEx.

In my case, this way can work as we expected.



来源:https://stackoverflow.com/questions/7679249/windows-ime-custom-korean-virtual-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!