PDA

View Full Version : Detecting When Keyboard Interacted With



brixel
23rd May 2016, 11:51
Hello,

Is it possible to track the keyboard even when the application is out of focus? I can track the keypresses when in focus, but I need to be able to do so whether the application is in focus or not. I only need to understand when the last time the keyboard was interacted with if that makes a difference. I'm doing something similar with the mouse using QCursor :: pos() so was hoping there was a similar solution for the keyboard in Qt.

If not in Qt, is there a library that I might be able to use to accomplish this? Thanks.

anda_skoa
23rd May 2016, 13:59
That depends on the system, i.e. whether applications are allowed to see other applications' events, global events, etc.

You'll need to consult the documentation of the platform you are using.

Cheers,
_