Hi Rajani
Hope you are all well over in Hamilton...
I think the issue here could be going back to the days when you were still in kindie...have you tried putting a WAIT WINDOW TIMEOUT 0.01 in your code and seeing if that has any effect? We used to have to do that to give FoxPro a chance to catch up and refresh the screen etc.
You mentioned that you can get this to work on different machines, so that implies an environmental issue.
However, I think perhaps a slightly more important question should be asked...why are you doing this at all? INKEY() loops used to be written like this to capture user input on things like menus and forms before VFP came along.
Regards
Simon