I wish to write a program that will perform some action on a key press event but if there is no key press in a certain period of time say 10 seconds, it should display an error message and exit. I am working on windows and am using the Tkinter GUI. I have searched the net for a possible solution but though I have found a code which would display an error message on a mouse click event etc. I cannot understand how I can code the program to exit if no keys or mouse button is pressed.
Please could you give me some ideas as to how I should do this.
Thanks for your help