One simple thing is to put a breakpoint in the window message loop for the WM_KEYDOWN and WM_KEYUP messages and step from there. After the message is received, you don't need to keep the key pressed. But be careful with WM_KEYDOWN because the debugger will take the focus and your window will not get the WM_KEYUP message, so the key will stay pressed.
Another way is to log messages with
OutputDebugString in the Visual Studio output panel.