问题描述:
判断CapsLock,Alt,Ctrl,Shift是否被按下
参考代码:
#include <stdio.h>
#include <windows.h>
int main()
{
while (1)
{
short sValue = GetKeyState(VK_CAPITAL);
if (sValue & 0x1)//该值低位位1,则表示CapsLock按下
printf("Caps Lock key is on\n");
else
printf("Caps Lock key is off\n");
if (G