5

I am writing a Qt application. At the first stage I want to receive all key press events, system-wide, without creating any widgets.

Is this possible in Qt, or do I have to hook into the underlying window system? (This needs to be cross-platform.)

spraff
  • 32,570
  • 22
  • 121
  • 229
  • What are you trying to achieve? – Mat Jan 09 '12 at 12:30
  • The keypresses control behaviour in a non-gui component. At the moment I have a dummy window for capturing focus, but that prevents me from doing other things. Also, my X11 setup is focus-follows-mouse, so I can't click on anything either. – spraff Jan 09 '12 at 12:33
  • 1
    http://stackoverflow.com/questions/2980141/hook-key-key-combinations-from-keyboard-with-qt-4-6 seems to fit. – Mat Jan 09 '12 at 12:40
  • Has anything changed in the last 4 years that makes this easier? – Troyseph Nov 03 '16 at 15:09

0 Answers0