A beginner in Windows GUI programming would possibly suggest to insert Application->ProcessMessages()/DoEvents() randomly in keyboard event handlers until it works...
But times of "cooperative multitasking" (where threads deliberately idle for others) are probably over.