UGlobalHotkey is an extension for Qt framework, which implements global hotkeys functionality for Windows Linux and MacOSX platforms. It is written by bakwc, extracted from Pastexen and turned into a shared library by me.
- You can either open project with QtCreator and press Build button
- Or build it using terminal:
qmake
make
UGlobalHotkeys *hotkeyManager = new UGlobalHotkeys();
hotkeyManager->RegisterHotkey("Ctrl+Shift+F12");
connect(hotkeyManager, &UGlobalHotkeys::Activated, [=](size_t id)
{
qDebug() << "Activated: " << QString::number(id);
});
UGlobalHotkey library is licensed as Public Domain, so you are free to do anything with it.