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

    Join Date
    Jul 2015
    Posts
    1
    Rep Power
    0

    Key and mouse listener in python


    Hello,

    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
    Posts
    5,975
    Rep Power
    510
    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