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

4 visualizaciones (últimos 30 días)
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
Fredrik

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by