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

조회 수: 4 (최근 30일)
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by