0

Like the title says, I would like to find a solution to get keys event in my QT Application even it's not focused.

It will allow me to show my QT Form (hidden by default) when user press a key.

Thanks !

m7913d
  • 10,244
  • 7
  • 28
  • 56
  • The DE typically won't deliver key events to an application which doesn't have focus. However, depending on the DE, you can install hooks which allow you to obtain these events. As an example, if you are targeting Windows, you can use [SetWindowsHookEx](https://msdn.microsoft.com/en-us/library/ms644990(VS.85).aspx). See [this SO answer](https://stackoverflow.com/a/1437186/955273) for an example – Steve Lorimer May 29 '17 at 20:53
  • Is your application or your form not focused? – m7913d May 30 '17 at 14:37
  • @SteveLorimer Thanks but I would like, if it's possible, to catch keys events regardless of the process in which it was generated –  May 30 '17 at 17:10
  • @m7913d It is my application that's not focused –  May 30 '17 at 17:11

0 Answers0