[Qt-interest] System-wide key listenning - keylogger

Gabriele Kahlout gabriele at mysimpatico.com
Thu Apr 29 23:14:56 CEST 2010


Hello,

I'm trying to implement to 'listen' to system-wide key presses of ctrl+3,
ctrl+4, and some other keys. I can do it with Qt's support when the QT
application is focused, but I cannot catch keys pressed otherwise. Judging
from the material I found, (although 3 years old) there seems not to be QT
cross-platform support for this. Is that the case? Will I have to rely on
code like in the 3rd link?

http://www.qtcentre.org/threads/5502-Grab-keyboard-events-in-Windows
http://www.qtcentre.org/threads/11436-Read-URL-from-a-browser-using-Qt?highlight=keylogger

This example suggests that QShortcuts are not system-wide, as described
above:
http://doc.qt.nokia.com/qtjambi-4.4/html/com/trolltech/qt/tutorials-tutorial-t14.html

http://www.daniweb.com/code/snippet217096.html#

-- 
Regards,
K. Gabriele

--- unchanged since 25/1/10 ---
P.S. Unless a notification (LON), please reply either with an answer OR with
" ACK" appended to this subject within 48 hours. Otherwise, I might resend.
In(LON, this) ∨ In(48h, TimeNow) ∨ ∃x. In(x, MyInbox) ∧ IsAnswerTo(x, this)
∨ (In(subject(this), subject(x)) ∧ In(ACK, subject(x)) ∧
¬IsAnswerTo(x,this)) ⇒ ¬IResend(this).

Also note that correspondence may be received only from specified a priori
senders, or if the subject of this email ends with a code, eg. -LICHT01X,
then also from senders whose reply contains it.
∀x. In(x, MyInbox) ⇒ In(senderAddress(x), MySafeSenderList) ∨ (∃y. In(y,
subject(this) ) ∧ In(y,x) ∧ isCodeLike(y, -LICHT01X) ).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100429/7f2f499d/attachment.html 


More information about the Qt-interest-old mailing list