如何在delphi中使用windows输入法?
我有几个键盘,它们输入不同的 TMemos。在英语中,一切正常,但在韩语中,击键会先发送到 IME,然后再发送到我的 onKeypress (它处理/识别不同的键盘),所以我无法确切地知道它之前来自哪个键盘。
我不太清楚如何使用 WinApi,但我需要学习使用处理 IME 的部分。 此处有很多信息,但我需要知道如何应用它德尔福。我需要存储每个用户的击键并将它们发送到 IME。
也许有人可以帮助我学习使用 IMM.PAS
I have several keyboards and they type in different TMemos. In english, everything works fine, but in Korean the keystrokes get sent to the IME before it sends it to my onKeypress (which handles/identifies the different keyboards), so I can't exactly tell which keyboard it came from before that.
I don't exactly know how to use WinApi, but I need to learn to use the part that deals with the IME. There is a lot of information HERE, but I need to know how to apply it in delphi. I need to store each users keystrokes and send them to the IME.
Perhaps someone can help me learn to use IMM.PAS
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让它工作了。使用 ImmGetContext、ImmSetCompositon、ImmGetComposition 和 NormalizeString。
旁注:我并没有真正使用 TEdit,我使用了 StringGrid 和 for 循环。 (不过大体思路已经有了)
Got it to work. Using ImmGetContext, ImmSetCompositon, ImmGetComposition and NormalizeString.
Side note: I didn't really use TEdit, I used a StringGrid and a for-loop. (but the general idea is there)
我怀疑 Windows 是否支持您想要做的事情,并且我怀疑您能否使 Windows 以不同的方式工作。听起来您正尝试在一台计算机上使用两个物理键盘。
IMM.PAS 是 Windows IME API 的包装器,似乎并不是为了帮助您准确地完成您想做的事情而编写的。
为什么不使用两台带有两个键盘的计算机?
I doubt that Windows supports what you want to do, and I doubt that you can make Windows work differently. It sounds like you are trying to use two physical keyboards on a single computer.
IMM.PAS is a wrapper for the Windows IME API, and does not appear to have been written to help you do exactly what you want to do.
Why aren't you using two computers, with two keyboards?