PDA

View Full Version : How to monitor global key presses



vanillac
31st January 2015, 03:17
There is the eventfilter which will only process key presses if its widget has the keyboard's focus. Is there any cross-platform way to record key presses with Qt? I have found one less than ideal solution, setting global hotkeys with libqxt or uglobalhotkey.

anda_skoa
31st January 2015, 06:26
Global as in application wide or system wide?

Cheers,
_

vanillac
31st January 2015, 18:26
System wide. I want to monitor more than a few shortcuts however so a global shortcut with one of those two libraries is not ideal (and they aren't working for me either).

anda_skoa
2nd February 2015, 10:23
That is system dependent.
You need to find the respective native API.

Cheers,
_