mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-22 03:15:52 +01:00
shortcuts fix
This commit is contained in:
parent
2eddebe1c2
commit
4cbd5f57be
12
filter.cpp
12
filter.cpp
@ -21,6 +21,10 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
QString sks;
|
||||
if(ke->key() == Qt::Key_Control) {
|
||||
sks = "Ctrl";
|
||||
#ifdef Q_OS_MAC
|
||||
} else if(ke->key() == Qt::Key_Meta) {
|
||||
sks = "Ctrl";
|
||||
#endif
|
||||
} else {
|
||||
QKeySequence ks(ke->modifiers() + ke->key());
|
||||
sks = ks.toString();
|
||||
@ -28,6 +32,8 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
#ifndef Q_OS_MAC
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Shift+Backtab"))
|
||||
break;
|
||||
#else
|
||||
sks.replace("Meta", "Ctrl");
|
||||
#endif
|
||||
emit sequencePressed(QVariant::fromValue<QObject*>(obj), sks);
|
||||
} break;
|
||||
@ -39,6 +45,10 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
QString sks;
|
||||
if(ke->key() == Qt::Key_Control) {
|
||||
sks = "Ctrl";
|
||||
#ifdef Q_OS_MAC
|
||||
} else if(ke->key() == Qt::Key_Meta) {
|
||||
sks = "Ctrl";
|
||||
#endif
|
||||
} else {
|
||||
QKeySequence ks(ke->modifiers() + ke->key());
|
||||
sks = ks.toString();
|
||||
@ -46,6 +56,8 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
||||
#ifndef Q_OS_MAC
|
||||
if(sks.contains("Alt+Tab") || sks.contains("Alt+Shift+Backtab"))
|
||||
break;
|
||||
#else
|
||||
sks.replace("Meta", "Ctrl");
|
||||
#endif
|
||||
emit sequenceReleased(QVariant::fromValue<QObject*>(obj), sks);
|
||||
} break;
|
||||
|
Loading…
Reference in New Issue
Block a user