Virtual keys can't detect RIGHT/LEFT Ctrl/Alt/Shift

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
feli_lecchini
Posts: 15
Joined: November 7th, 2022, 12:58 am

Virtual keys can't detect RIGHT/LEFT Ctrl/Alt/Shift

Post by feli_lecchini » November 13th, 2022, 11:33 pm

Like the title says, when I Implement VK_LCONTROL or VK_RCONTROL they don't work. Only VK_CONTROL works. The same goes for ALT and SHIFT keys.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Virtual keys can't detect RIGHT/LEFT Ctrl/Alt/Shift

Post by albinopapa » November 29th, 2022, 8:52 am

https://learn.microsoft.com/en-us/windo ... nckeystate

You'll have to call GetASyncKeyState() to determine which control, shift or alt button was pressed.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

feli_lecchini
Posts: 15
Joined: November 7th, 2022, 12:58 am

Re: Virtual keys can't detect RIGHT/LEFT Ctrl/Alt/Shift

Post by feli_lecchini » December 2nd, 2022, 11:50 am

I'm gonna try it...

Post Reply