Results 1 to 4 of 4

Thread: Capture key & key combinations from keyboard

  1. #1
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Lightbulb Capture key & key combinations from keyboard

    Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen capture but I don't know how to monitor keyboard globally for key combinations. Please kindly advise. Any help or hint is greatly appreciated! Thanks in advance!

  2. #2
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Capture key & key combinations from keyboard

    I don't think there is anything in Qt to do this but have a look at hotkey.cpp. There are implementations for Windows and Linux in the drop down list of files.

  3. The following user says thank you to numbat for this useful post:

    aikidorb (5th June 2010)

  4. #3
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Capture key & key combinations from keyboard


  5. The following user says thank you to tbscope for this useful post:

    aikidorb (5th June 2010)

  6. #4
    Join Date
    Jun 2008
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Capture key & key combinations from keyboard

    Thank you very much numbat & tbscope. Your prompt responses are very appreciated. Let me have a look at the pointers.

Similar Threads

  1. Image capture
    By TheDuncan in forum Newbie
    Replies: 1
    Last Post: 13th April 2010, 09:12
  2. Replies: 3
    Last Post: 5th July 2009, 18:22
  3. How to capture a window?
    By Misenko in forum Qt Programming
    Replies: 2
    Last Post: 12th September 2008, 16:36
  4. Application Id Capture
    By PRIYANOB in forum Qt Programming
    Replies: 1
    Last Post: 11th September 2007, 12:31
  5. Capture a keyboard event
    By mahe2310 in forum Qt Programming
    Replies: 8
    Last Post: 16th February 2006, 12:19

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.