Hey guys I'm using Codeblocks from C. I read https://msdn.microsoft.com/en-us/library/windows/desktop/ms646301(v=vs.85).aspx but I can't understand what I need to change in this code to make it case-sensitive.
void getInput()
{
while(1)
{
if((GetAsyncKeyState('A') & 0x8008)) {
printf("qwe");
}
}
}
Code works and I don't get any errors. Only problem is this doesn't differentiate between pressing a
or A
, it will print qwe
in both cases. How can I fix this?
Thanks @EugeneSh., solution is to check the state of
VK_CAPITAL
, see if Shift is on: