I have to detect key input from the keypad (1-9) as well as whether CTRL/SHIFT/ALT was held down at the same time. I'm currently using multiple GetAsyncKeyState functions right now in if statements. I'll experiment using a switch statement for this purpose if there is no other way to achieve this.
Basically what I'm looking for is a tidier way of achieving this:
1 2 3 4 5 6 7 8 9 10 11
if ((GetAsyncKeyState(SHIFT) && KEY_PRESSEDFORCE) && (GetAsyncKeyState(CTRL) && KEY_PRESSEDFORCE) && (GetAsyncKeyState(ONE) && KEY_PRESSED))
{
multiClipboard.getCB(0);
Sleep(500);
}
if ((GetAsyncKeyState(SHIFT) && KEY_PRESSEDFORCE) && (GetAsyncKeyState(CTRL) && KEY_PRESSEDFORCE) && (GetAsyncKeyState(TWO) && KEY_PRESSED))
{
multiClipboard.getCB(1);
Sleep(500);
}
.... (There are more of these, up to NINE, but this gets the point across)
(ONE-NINE, CTRL, SHIFT, KEY_PRESSED etc are all enumerators containing the code for the keypads.)