🎉 Celebrating 25 Years of GameDev.net! 🎉

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!

Where is my CAPS ???

Started by
0 comments, last by Akura 24 years, 7 months ago
Hi.

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

It's good to be an outcast, you don't need to explain what you do, you just do it and say you don't belong there.
Advertisement
Hello 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

This topic is closed to new replies.

Advertisement