jjzjj

VkKeyScanW

全部标签

c++ - 为什么 VkKeyScanW 对 unicode 字符返回 -1?

我正在尝试使用VkKeyScanW函数将字符转换为相应的虚拟键代码。它适用于ASCII字符,但在传递unicode字符(中文/俄语字符)时失败。shortvcode=VkKeyScanW(ch);//chisofwchar_ttype;cout我在这里做错了什么?还有其他方法可以实现吗?我想将虚拟键代码传递给SendInput函数。VkKeyScanWfunctiondocumentation 最佳答案 VkKeyScan()documentation说:Translatesacharactertothecorrespondingv