I was writing a console program in Python using the curses library. There was a problem with the keyboard library tracking keystrokes regardless of whether the console application was deployed or not. I found one answer on this forum, which says that you can use winAPI to get information about the state of a window (using a window handle), but the method did not work. Please tell me how to do this? Continue reading...