I forgot about that.
To receive keyboard messages you need to press or release the key, or receive a "repeat" message. If you keep a key pressed, you'll only get a repeat message after a certain delay. Like in a text editor, if you press 'a' and keep the key pressed, you get 1 'a' directly, then after a few moment, you'll get a second 'a', and after that you'll get another 'a' more rapidly. Those message intervals are more than a frame time (configurable in windows settings), so in a game you can't rely on that and you use the last frame state to know if a key is still pressed.
There is another way to get key state: GetAsyncKeyState
. This would always give you the key state. I don't know if there are downsides to using that.