如何使用 c++ 发送 unicode 密钥(keybd_事件)
我的朋友正在学习挪威语,我想制作一个全局热键程序,该程序发送诸如
æ
ø
å
我的问题是 keybd_event 函数不允许我发送这些键,我似乎仅限于 虚拟按键代码 是否还有其他我可以使用的功能或发送它们的技巧?
My friend is learning Norwegian and i want to make a global hot key program which sends keys such as
æ
ø
å
My problem is that keybd_event function wont allow me to send those keys, i seem to be restricted to the virtual key codes is there another function that i could use or some trick to sending them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须改用 SendInput。 keybd_event 不支持发送此类字符(除非它们已经在当前代码页中,例如在挪威计算机上)。发送一些示例代码 å:
如果您不知道:在 Windows 上安装其他键盘布局并使用快捷方式在它们之间切换很容易。
直到!
You have to use SendInput instead. keybd_event does not support sending such characters (except if they are already in the current codepage, like on Norwegian computers). A bit of sample code to send an å:
In case you didn't know: it is easy to install additional keyboard layouts on Windows and switch between them with a shortcut.
Lykke til!