I think using messages is little faster. Calling getASyncKeyState hunderds of times a sec, is likely to be slower than handling only a few messages (or none, when no key is pressed). Moreover, when you use messages, less code is executed when you press a key, because you only have to change one array entry. You only have to respond to some messages which will be send to you anyway.