Results 1 to 2 of 2

Thread: Detecting When Keyboard Interacted With

  1. #1
    Join Date
    Nov 2015
    Posts
    22
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Detecting When Keyboard Interacted With

    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.
    Last edited by brixel; 23rd May 2016 at 13:53.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Detecting When Keyboard Interacted With

    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,
    _

Similar Threads

  1. keyboard - detecting key pressed
    By Tomasz in forum Newbie
    Replies: 9
    Last Post: 19th April 2011, 13:41
  2. QT3 - detecting peer
    By sinja in forum Qt Programming
    Replies: 2
    Last Post: 7th October 2009, 17:44
  3. Detecting OS
    By ankit17.ag in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 10:10
  4. detecting Hardware?!?!
    By nupul in forum Newbie
    Replies: 2
    Last Post: 7th April 2006, 08:50

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.