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?

Global hotkey in Qt5?

Scheduled Pinned Locked Moved General and Desktop
hotkeyqt5system
5 Posts 5 Posters 3.5k Views
  • 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 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?

    Jonas KvingeJ 1 Reply Last reply
    1
    • LeandroAL Offline
      LeandroAL Offline
      LeandroA
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • FolcoF Offline
        FolcoF Offline
        Folco
        wrote on last edited by Folco
        #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
        • lukas_kosinskiL Offline
          lukas_kosinskiL Offline
          lukas_kosinski
          wrote on 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

            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?

            Jonas KvingeJ Offline
            Jonas KvingeJ Offline
            Jonas Kvinge
            wrote on 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