Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Global hotkey in Qt5?
Forum Updated to NodeBB v4.3 + New Features

Global hotkey in Qt5?

Scheduled Pinned Locked Moved General and Desktop
hotkeyqt5system
5 Posts 5 Posters 3.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    slesa
    wrote on 24 Sept 2015, 06:34 last edited by
    #1

    Hi all,

    isn't it still possible to set a system wide hook to allow global hotkeys?
    I am converting the good old launchy program to qt5. But I am failing to install the keyboard event filter on any system (win,lin,mac).

    Now I tried to use the QXt lib, but I get "qpa/qplatformnativeinterface.h not found" (qpa is set, though).

    Is there a better way to activate a program by a global hotkey?

    J 1 Reply Last reply 10 Jan 2021, 21:34
    1
    • L Offline
      L Offline
      LeandroA
      wrote on 2 Jul 2016, 17:22 last edited by
      #2

      Did you get it working?
      I'm looking for the same solution.

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Folco
        wrote on 9 Jul 2016, 23:55 last edited by Folco 7 Sept 2016, 23:57
        #3

        Hi,

        Perhaps you could use that ? http://amin-ahmadi.com/2015/11/14/how-to-use-system-wide-hotkeys-in-your-qt-application/
        Sadly, it's something dropped with the end of QXt, and it would be really nice to add a handy way to do that in Qt...

        1 Reply Last reply
        1
        • L Offline
          L Offline
          lukas_kosinski
          wrote on 4 Jan 2021, 17:29 last edited by
          #4

          Hi! You can track the keyboard input, when the app isn't in focus using built-in Windows libraries. Unfortunately, it's not so easily possible on the Unix based systems. If you want to know more, check out this article.

          1 Reply Last reply
          0
          • S slesa
            24 Sept 2015, 06:34

            Hi all,

            isn't it still possible to set a system wide hook to allow global hotkeys?
            I am converting the good old launchy program to qt5. But I am failing to install the keyboard event filter on any system (win,lin,mac).

            Now I tried to use the QXt lib, but I get "qpa/qplatformnativeinterface.h not found" (qpa is set, though).

            Is there a better way to activate a program by a global hotkey?

            J Offline
            J Offline
            Jonas Kvinge
            wrote on 10 Jan 2021, 21:34 last edited by
            #5

            @slesa said in Global hotkey in Qt5?:

            Hi all,

            isn't it still possible to set a system wide hook to allow global hotkeys?
            I am converting the good old launchy program to qt5. But I am failing to install the keyboard event filter on any system (win,lin,mac).

            Now I tried to use the QXt lib, but I get "qpa/qplatformnativeinterface.h not found" (qpa is set, though).

            Missing private gui headers (dev/devel package). libQt5Gui-private-headers-devel

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved