mirror of
https://github.com/Skycoder42/QHotkey.git
synced 2026-11-19 12:49:58 +03:00
added addGlobalMapping method
Enables overrides for specific key sequences, fixes #11
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include "hottestwidget.h"
|
||||
#include "ui_hottestwidget.h"
|
||||
|
||||
//#define TEST_MAPPING
|
||||
|
||||
HotTestWidget::HotTestWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::HotTestWidget),
|
||||
@@ -18,6 +20,11 @@ HotTestWidget::HotTestWidget(QWidget *parent) :
|
||||
this->thread4->start();
|
||||
this->thread5->start();
|
||||
|
||||
#ifdef TEST_MAPPING
|
||||
//shortcut mapping override
|
||||
QHotkey::addGlobalMapping(QKeySequence("X"), QHotkey::NativeShortcut());// add invalid mapping to test if the overwrite works for all platforms
|
||||
#endif
|
||||
|
||||
//1
|
||||
connect(this->ui->hotkeyCheckbox_1, &QCheckBox::toggled,
|
||||
this->hotkey_1, &QHotkey::setRegistered);
|
||||
|
||||
Reference in New Issue
Block a user