As my other recent posts indicate, I'm rather new to Delphi. I've been fiddling around with the GetAsyncKeyState function for a program I'm starting on, but I can't seem to get it to work properly. I've made the below code just to test it:
WHILE GetAsyncKeyState(VK_RETURN) = 0 DO BEGIN
The problem is that the console window just freezes, most of the time showing "0", but sometimes showing "1". If I press RETURN or DELETE nothing happens. After a while the computer just beeps every time I press a button and I have to CTRL-ALT-DEL and shut down the console window. Does this have something to do with focus? What am I doing wrong?