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

3 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Jan
Jan il 7 Gen 2021
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 Commento
Giovanni Franzini
Giovanni Franzini il 7 Gen 2021
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!

Accedi per commentare.

Categorie

Scopri di più su Desktop in Help Center e File Exchange

Prodotti


Release

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by