the AreAllKeysPressed() is for detecte if the user pressed that vector of keys(all keys) in same time. but theres more 2 variables that i must keep in mind:
1 - the user can't immediatly press the 2 or 3 keys in same time;
2 - i'm using the key down message. and that can be a problem too.. because, the AreAllKeysPressed() can be called again with a diferent vector of keys.
i understand what you mean and maybe you understand me too.
i will trying fix these problem ;)
Problem #2 is because you have a non-modular design. IE: you are using globals (or rather, statics). This is exactly why you should avoid doing things this way.
A more modular approach to this problem would be to keep a history of keys pressed. Currently, you are not doing this... you are only looking at the current state of the keys and looking to see if that state matches part of the given pattern. Instead, you could keep track of the key state in some kind of circular buffer (you could probably used a deque)
Problem #1 is trickier. You'll have to allow some time between key presses. IE, if another key is pressed (and being held down) within X ms of another key being pressed, then treat it as if the user pressed both at the same time. This is easier to do if you have a deque with the key history.
Do you really need the entire keyboard? This would be much easier if you restricted controls to a handful of keys. I'm assuming this is for a game. I can't imagine why any game (or really... any program) would need to monitor complex key patterns for more than 16 or so keys.