永发信息网

Win32中如何判断多个键同时按下

答案:1  悬赏:0  手机版
解决时间 2021-11-12 01:42
Win32中如何判断多个键同时按下
最佳答案
可以使用下面的两个Win32函数
GetKeyState
The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).
SHORT GetKeyState(
int nVirtKey   // virtual-key code); nVirtKey   // virtual-key code);

Parameters
nVirtKey
[in] Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9),nVirtKey must be set to the ASCII value of that character. For other keys, it must be a virtual-key code.
If a non-English keyboard layout is used, virtual keys with values in the range ASCII A through Z and 0 through 9 are used to specify most of the character keys. For example, for the German keyboard layout, the virtual key of value ASCII O (0x4F) refers to the "o" key, whereas VK_OEM_1 refers to the "o with umlaut" key.
Return Values
The return value specifies the status of the specified virtual key, as follows:

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
关于全班上课说话检讨书2000字
7Xx+3=57+x怎么算
龙成教育公司(御驰街)地址在什么地方,我要处
结构脚手架与装饰脚手架的区别
大华网络摄像机广角6和8有什么区别
佳字的头个拼音
FeSO4和NaOH反应的离子方程式
教师资格证用4年前的准考证有效吗?
三百一十四乘二十七减十四乘二十七的简便计算
master和postgraduate的区别
一亩地能种植多少斤生姜,又能收获多少斤生 我
加班费按底薪的1比1怎么算
为什么练霓裳不喜欢岳鸣科
浙江省嵊州市三界镇的历史
他总和我说谢谢,是不是很生分
推荐资讯
自建房外墙周边的雨水应怎么流向
卤肉+卤蛋的做法步骤图,卤肉+卤蛋怎么做好
水泵绕组接线
同一种材料,弹性模量与硬度的关系?
烈士 纪念碑
上海富海船舶服务有限公司怎么样?
冬梅标书装订印刷制作写真喷绘地址在哪,我要
越秀岭南山畔10栋是不是风水不好
lion★punch同人本
是只是你一直认为我不想你,
应该想到先做什么,后做什么,不能
打印机墨盒无法移动是怎么回事?
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?