check for keyboard press while using another application (such as Chrome)

조회 수: 2 (최근 30일)
Giovanni Franzini
Giovanni Franzini 2021년 1월 7일
댓글: Giovanni Franzini 2021년 1월 7일
Hello,
I am wondering if it is possible to launch a script, which waits for a specific keyboard key to be pressed before proceeding with the execution.
I know this is possible within matlab environment, but I need it when I am using other applications (such as Word or browsing on the Internet).
As such, I would like to:
1) launch the script,
2) open another application, while the script is waiting for the keyboard key to be pressed,
3) the script should detect the key in order to fully executed.
Thank you.

답변 (1개)

Jan
Jan 2021년 1월 7일
The key should be caught, while the browser is the active window? This is a keyboard sniffer and running it might be conflict with the laws. Another problem is the usability: it is not the expected behavior of a software to catch user actions in other programs. So this could or should confuse the users of your program.
  댓글 수: 1
Giovanni Franzini
Giovanni Franzini 2021년 1월 7일
My intention is to launch the script while browsing and by hitting a specific key (while the browser is the active window) to capture a screenshot and perform some analysis on it. It is just for personal use of course!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Desktop에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by