1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2015
    Rep Power

    Key and mouse listener in python


    I'm working in a project with PyQt4 and Python 2.7, I need to be able to count the key and clicks
    pressed while the program it's runing, but I need to be able to get this in all the system not just in GUIs.
    and also get the title of the active window.

    I need a cross-plataform solution, I've been cheking PyUserInput but this sames to be only for controling
    the keyboard and mouse.

    it's there a module or lib to do this ??
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    I think that is not possible using PyQt. Portable means it should work on an X11 system. Well, suppose a keyboard event happens, and the first application that gets it handles the event and sets the "do not pass the event to other applications" flag. Your program won't know the event occurred. On the other hand, my specialty is scientific applications, not guis nor web.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo