Results 1 to 3 of 3

Thread: Hooking Keyboard and mouse

  1. #1
    Join Date
    Aug 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Hooking Keyboard and mouse

    hi everyone.
    i'm a newbie in linux and qt . i have a project that i must impelement an user interface for linux operating system , thin interface should does task like this : for ex i wanna log inot a file or database every user intercation with diffrent software , whenever a user click mouse on a software for opening it , when ever the user press the keyboard in kde enviroment ,whenever a user minimize or maximaze window i wanted to know which windows became minimized or max by the user . at first i must be able to hook the mouse and keyboard with my QT application , as i told you , i should hook them because i wanna my program has the ability to process keys and mous click even if my program in working in background . i would be very thanksfull in advance of everyon that try to help me . thanks alot moya .

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Hooking Keyboard and mouse

    If you want to track events of other application than yours, it might not be possible since its an OS level operation.
    If you want to track events in your application, you might consider using event filters.
    QObject::installEventFilter

  3. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Hooking Keyboard and mouse

    as a newbie learn events in Qt ..
    http://doc.trolltech.com/4.5/qevent.html
    this will be useful
    "Behind every great fortune lies a crime" - Balzac

Similar Threads

  1. Replies: 3
    Last Post: 9th March 2010, 09:37
  2. Discussion about developing an onscreen keyboard in Qt
    By montylee in forum Qt Programming
    Replies: 6
    Last Post: 2nd January 2009, 20:09
  3. Changing mouse grabbing behavior?
    By FlyingSaucrDude in forum Qt Programming
    Replies: 0
    Last Post: 11th November 2008, 01:04
  4. How to enable keyboard and mouse as input in qtopia-2.1.1
    By hvreddy1110 in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 12th October 2006, 10:30
  5. Replies: 2
    Last Post: 24th July 2006, 18:36

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
  •  
Qt is a trademark of The Qt Company.