I am developing an application for a kiosk machine which has a video playing function. It works like this, when the machine is idle for some time e.g. 2 mins, the video start playing. Upon user input is detected, the video stops and screen return to the kiosk menu.
I plan to do it this way. Set a timer to launch the video displaying function. Everytime an user input is detect, the timer is reset. While if the video is playing when user input is detected, the program will close the video playing function and return to the kiosk application.
The problem for is that there are several applications running on the machine, and some are external application that I cannot modify.
So, I need a way to detect the mouse move, mouse key press and keybroad key press for all applications (including external applications). Please advice, it would be okay if you suggest another model or give hints about which functions or api to use. Thanks in advance.