MATLAB Answers

How to detect if the user has pressed the mouse button anywhere on the screen?

1 view (last 30 days)
Spigge on 17 Jul 2015
In my GUI application, I want to reset a time variable when the mouse button is pressed anywhere on the screen. The idea is to detect if a user is actively working with the application or not. I have tried using the main figure's property WindowsButtonDownFcn . However, the WindowsButtonDownFcn is not activated when the user presses on a uicontrol on the figure, such as a push button. How can I reset my time variable by mouse click regardlessly of which object is under the pointer?
Many thanks


Sign in to comment.

Answers (0)

Sign in to answer this question.