I was just wondering how i can get teh state of Caps Lock with DInput ... is it possible ??? if so how ?? if now ?? how can I so it only using the win32 api ...
Thks !!
Akura
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
I was just wondering how i can get teh state of Caps Lock with DInput ... is it possible ??? if so how ?? if now ?? how can I so it only using the win32 api ...
Thks !!
Akura
You can use DIK_CAPSLOCK or DIK_CAPITAL like this:
char keys[256];
LPDIRECTINPUTDEVICE pKeyb; // I suggest that DI and DID are already properly initialized
pKeyb->GetDeviceState(sizeof(keys), keys);
if (keys[DIK_CAPSLOCK] & 0x80)
{
// CAPS LOCK is pressed
}
VirtualNext