mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-28 04:54:30 +00:00
Update kbm_gui.cpp
This commit is contained in:
parent
2f28d38814
commit
0ebf9f252f
@ -657,10 +657,10 @@ void KBMSettings::CheckMapping(QPushButton*& button) {
|
|||||||
MappingTimer -= 1;
|
MappingTimer -= 1;
|
||||||
button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]");
|
button->setText(tr("Press a key") + " [" + QString::number(MappingTimer) + "]");
|
||||||
|
|
||||||
if (pressedNonInt.size() > 0) {
|
if (pressedKeys.size() > 0) {
|
||||||
QStringList keyStrings;
|
QStringList keyStrings;
|
||||||
|
|
||||||
for (const QString& buttonAction : pressedNonInt) {
|
for (const QString& buttonAction : pressedKeys) {
|
||||||
keyStrings << buttonAction;
|
keyStrings << buttonAction;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ void KBMSettings::CheckMapping(QPushButton*& button) {
|
|||||||
EnableMapping = false;
|
EnableMapping = false;
|
||||||
|
|
||||||
MappingButton->setText(combo);
|
MappingButton->setText(combo);
|
||||||
pressedNonInt.clear();
|
pressedKeys.clear();
|
||||||
timer->stop();
|
timer->stop();
|
||||||
}
|
}
|
||||||
if (MappingCompleted) {
|
if (MappingCompleted) {
|
||||||
@ -709,280 +709,280 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
if (keyEvent->isAutoRepeat())
|
if (keyEvent->isAutoRepeat())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (pressedNonInt.size() >= 3) {
|
if (pressedKeys.size() >= 3) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (keyEvent->key()) {
|
switch (keyEvent->key()) {
|
||||||
case Qt::Key_Space:
|
case Qt::Key_Space:
|
||||||
pressedNonInt.insert("space");
|
pressedKeys.insert("space");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Comma:
|
case Qt::Key_Comma:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kpcomma");
|
pressedKeys.insert("kpcomma");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("comma");
|
pressedKeys.insert("comma");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Period:
|
case Qt::Key_Period:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kpperiod");
|
pressedKeys.insert("kpperiod");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("period");
|
pressedKeys.insert("period");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Slash:
|
case Qt::Key_Slash:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers())
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers())
|
||||||
pressedNonInt.insert("kpdivide");
|
pressedKeys.insert("kpdivide");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Asterisk:
|
case Qt::Key_Asterisk:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers())
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers())
|
||||||
pressedNonInt.insert("kpmultiply");
|
pressedKeys.insert("kpmultiply");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Question:
|
case Qt::Key_Question:
|
||||||
pressedNonInt.insert("question");
|
pressedKeys.insert("question");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Semicolon:
|
case Qt::Key_Semicolon:
|
||||||
pressedNonInt.insert("semicolon");
|
pressedKeys.insert("semicolon");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Minus:
|
case Qt::Key_Minus:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kpminus");
|
pressedKeys.insert("kpminus");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("minus");
|
pressedKeys.insert("minus");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Plus:
|
case Qt::Key_Plus:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kpplus");
|
pressedKeys.insert("kpplus");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("plus");
|
pressedKeys.insert("plus");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_ParenLeft:
|
case Qt::Key_ParenLeft:
|
||||||
pressedNonInt.insert("lparenthesis");
|
pressedKeys.insert("lparenthesis");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_ParenRight:
|
case Qt::Key_ParenRight:
|
||||||
pressedNonInt.insert("rparenthesis");
|
pressedKeys.insert("rparenthesis");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_BracketLeft:
|
case Qt::Key_BracketLeft:
|
||||||
pressedNonInt.insert("lbracket");
|
pressedKeys.insert("lbracket");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_BracketRight:
|
case Qt::Key_BracketRight:
|
||||||
pressedNonInt.insert("rbracket");
|
pressedKeys.insert("rbracket");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_BraceLeft:
|
case Qt::Key_BraceLeft:
|
||||||
pressedNonInt.insert("lbrace");
|
pressedKeys.insert("lbrace");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_BraceRight:
|
case Qt::Key_BraceRight:
|
||||||
pressedNonInt.insert("rbrace");
|
pressedKeys.insert("rbrace");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Backslash:
|
case Qt::Key_Backslash:
|
||||||
pressedNonInt.insert("backslash");
|
pressedKeys.insert("backslash");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Tab:
|
case Qt::Key_Tab:
|
||||||
pressedNonInt.insert("tab");
|
pressedKeys.insert("tab");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Backspace:
|
case Qt::Key_Backspace:
|
||||||
pressedNonInt.insert("backspace");
|
pressedKeys.insert("backspace");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Return:
|
case Qt::Key_Return:
|
||||||
pressedNonInt.insert("enter");
|
pressedKeys.insert("enter");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Enter:
|
case Qt::Key_Enter:
|
||||||
pressedNonInt.insert("kpenter");
|
pressedKeys.insert("kpenter");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Escape:
|
case Qt::Key_Escape:
|
||||||
pressedNonInt.insert("unmapped");
|
pressedKeys.insert("unmapped");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Shift:
|
case Qt::Key_Shift:
|
||||||
if (keyEvent->nativeScanCode() == rshift) {
|
if (keyEvent->nativeScanCode() == rshift) {
|
||||||
pressedNonInt.insert("rshift");
|
pressedKeys.insert("rshift");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("lshift");
|
pressedKeys.insert("lshift");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Alt:
|
case Qt::Key_Alt:
|
||||||
if (keyEvent->nativeScanCode() == ralt) {
|
if (keyEvent->nativeScanCode() == ralt) {
|
||||||
pressedNonInt.insert("ralt");
|
pressedKeys.insert("ralt");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("lalt");
|
pressedKeys.insert("lalt");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Control:
|
case Qt::Key_Control:
|
||||||
if (keyEvent->nativeScanCode() == rctrl) {
|
if (keyEvent->nativeScanCode() == rctrl) {
|
||||||
pressedNonInt.insert("rctrl");
|
pressedKeys.insert("rctrl");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("lctrl");
|
pressedKeys.insert("lctrl");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Meta:
|
case Qt::Key_Meta:
|
||||||
activateWindow();
|
activateWindow();
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
pressedNonInt.insert("lwin");
|
pressedKeys.insert("lwin");
|
||||||
#else
|
#else
|
||||||
pressedNonInt.insert("lmeta");
|
pressedKeys.insert("lmeta");
|
||||||
#endif
|
#endif
|
||||||
case Qt::Key_1:
|
case Qt::Key_1:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp1");
|
pressedKeys.insert("kp1");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("1");
|
pressedKeys.insert("1");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_2:
|
case Qt::Key_2:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp2");
|
pressedKeys.insert("kp2");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("2");
|
pressedKeys.insert("2");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_3:
|
case Qt::Key_3:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp3");
|
pressedKeys.insert("kp3");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("3");
|
pressedKeys.insert("3");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_4:
|
case Qt::Key_4:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp4");
|
pressedKeys.insert("kp4");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("4");
|
pressedKeys.insert("4");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_5:
|
case Qt::Key_5:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp5");
|
pressedKeys.insert("kp5");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("5");
|
pressedKeys.insert("5");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_6:
|
case Qt::Key_6:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp6");
|
pressedKeys.insert("kp6");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("6");
|
pressedKeys.insert("6");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_7:
|
case Qt::Key_7:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp7");
|
pressedKeys.insert("kp7");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("7");
|
pressedKeys.insert("7");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_8:
|
case Qt::Key_8:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp8");
|
pressedKeys.insert("kp8");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("8");
|
pressedKeys.insert("8");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_9:
|
case Qt::Key_9:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp9");
|
pressedKeys.insert("kp9");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("9");
|
pressedKeys.insert("9");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_0:
|
case Qt::Key_0:
|
||||||
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
if (Qt::KeypadModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("kp0");
|
pressedKeys.insert("kp0");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("0");
|
pressedKeys.insert("0");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Up:
|
case Qt::Key_Up:
|
||||||
activateWindow();
|
activateWindow();
|
||||||
pressedNonInt.insert("up");
|
pressedKeys.insert("up");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Down:
|
case Qt::Key_Down:
|
||||||
pressedNonInt.insert("down");
|
pressedKeys.insert("down");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Left:
|
case Qt::Key_Left:
|
||||||
pressedNonInt.insert("left");
|
pressedKeys.insert("left");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Right:
|
case Qt::Key_Right:
|
||||||
pressedNonInt.insert("right");
|
pressedKeys.insert("right");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_A:
|
case Qt::Key_A:
|
||||||
pressedNonInt.insert("a");
|
pressedKeys.insert("a");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_B:
|
case Qt::Key_B:
|
||||||
pressedNonInt.insert("b");
|
pressedKeys.insert("b");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_C:
|
case Qt::Key_C:
|
||||||
pressedNonInt.insert("c");
|
pressedKeys.insert("c");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_D:
|
case Qt::Key_D:
|
||||||
pressedNonInt.insert("d");
|
pressedKeys.insert("d");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_E:
|
case Qt::Key_E:
|
||||||
pressedNonInt.insert("e");
|
pressedKeys.insert("e");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_F:
|
case Qt::Key_F:
|
||||||
pressedNonInt.insert("f");
|
pressedKeys.insert("f");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_G:
|
case Qt::Key_G:
|
||||||
pressedNonInt.insert("g");
|
pressedKeys.insert("g");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_H:
|
case Qt::Key_H:
|
||||||
pressedNonInt.insert("h");
|
pressedKeys.insert("h");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_I:
|
case Qt::Key_I:
|
||||||
pressedNonInt.insert("i");
|
pressedKeys.insert("i");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_J:
|
case Qt::Key_J:
|
||||||
pressedNonInt.insert("j");
|
pressedKeys.insert("j");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_K:
|
case Qt::Key_K:
|
||||||
pressedNonInt.insert("k");
|
pressedKeys.insert("k");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_L:
|
case Qt::Key_L:
|
||||||
pressedNonInt.insert("l");
|
pressedKeys.insert("l");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_M:
|
case Qt::Key_M:
|
||||||
pressedNonInt.insert("m");
|
pressedKeys.insert("m");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_N:
|
case Qt::Key_N:
|
||||||
pressedNonInt.insert("n");
|
pressedKeys.insert("n");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_O:
|
case Qt::Key_O:
|
||||||
pressedNonInt.insert("o");
|
pressedKeys.insert("o");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_P:
|
case Qt::Key_P:
|
||||||
pressedNonInt.insert("p");
|
pressedKeys.insert("p");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Q:
|
case Qt::Key_Q:
|
||||||
pressedNonInt.insert("q");
|
pressedKeys.insert("q");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_R:
|
case Qt::Key_R:
|
||||||
pressedNonInt.insert("r");
|
pressedKeys.insert("r");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_S:
|
case Qt::Key_S:
|
||||||
pressedNonInt.insert("s");
|
pressedKeys.insert("s");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_T:
|
case Qt::Key_T:
|
||||||
pressedNonInt.insert("t");
|
pressedKeys.insert("t");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_U:
|
case Qt::Key_U:
|
||||||
pressedNonInt.insert("u");
|
pressedKeys.insert("u");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_V:
|
case Qt::Key_V:
|
||||||
pressedNonInt.insert("v");
|
pressedKeys.insert("v");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_W:
|
case Qt::Key_W:
|
||||||
pressedNonInt.insert("w");
|
pressedKeys.insert("w");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_X:
|
case Qt::Key_X:
|
||||||
pressedNonInt.insert("x");
|
pressedKeys.insert("x");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Y:
|
case Qt::Key_Y:
|
||||||
pressedNonInt.insert("Y");
|
pressedKeys.insert("Y");
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Z:
|
case Qt::Key_Z:
|
||||||
pressedNonInt.insert("z");
|
pressedKeys.insert("z");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -993,16 +993,16 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
|
|
||||||
if (event->type() == QEvent::MouseButtonPress) {
|
if (event->type() == QEvent::MouseButtonPress) {
|
||||||
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
|
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);
|
||||||
if (pressedNonInt.size() < 3) {
|
if (pressedKeys.size() < 3) {
|
||||||
switch (mouseEvent->button()) {
|
switch (mouseEvent->button()) {
|
||||||
case Qt::LeftButton:
|
case Qt::LeftButton:
|
||||||
pressedNonInt.insert("leftbutton");
|
pressedKeys.insert("leftbutton");
|
||||||
break;
|
break;
|
||||||
case Qt::RightButton:
|
case Qt::RightButton:
|
||||||
pressedNonInt.insert("rightbutton");
|
pressedKeys.insert("rightbutton");
|
||||||
break;
|
break;
|
||||||
case Qt::MiddleButton:
|
case Qt::MiddleButton:
|
||||||
pressedNonInt.insert("middlebutton");
|
pressedKeys.insert("middlebutton");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -1017,17 +1017,17 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
|
|
||||||
if (event->type() == QEvent::Wheel) {
|
if (event->type() == QEvent::Wheel) {
|
||||||
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
|
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>(event);
|
||||||
if (pressedNonInt.size() < 3) {
|
if (pressedKeys.size() < 3) {
|
||||||
if (wheelEvent->angleDelta().y() > 5) {
|
if (wheelEvent->angleDelta().y() > 5) {
|
||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
pressedNonInt.insert("mousewheelup");
|
pressedKeys.insert("mousewheelup");
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||||
}
|
}
|
||||||
} else if (wheelEvent->angleDelta().y() < -5) {
|
} else if (wheelEvent->angleDelta().y() < -5) {
|
||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
pressedNonInt.insert("mousewheeldown");
|
pressedKeys.insert("mousewheeldown");
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||||
tr("Mousewheel cannot be mapped to stick outputs"));
|
tr("Mousewheel cannot be mapped to stick outputs"));
|
||||||
@ -1037,9 +1037,9 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
// QT changes scrolling to horizontal for all widgets with the alt modifier
|
// QT changes scrolling to horizontal for all widgets with the alt modifier
|
||||||
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("mousewheelup");
|
pressedKeys.insert("mousewheelup");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("mousewheelright");
|
pressedKeys.insert("mousewheelright");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||||
@ -1048,9 +1048,9 @@ bool KBMSettings::eventFilter(QObject* obj, QEvent* event) {
|
|||||||
} else if (wheelEvent->angleDelta().x() < -5) {
|
} else if (wheelEvent->angleDelta().x() < -5) {
|
||||||
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
if (std::find(AxisList.begin(), AxisList.end(), MappingButton) == AxisList.end()) {
|
||||||
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
if (Qt::AltModifier & QApplication::keyboardModifiers()) {
|
||||||
pressedNonInt.insert("mousewheeldown");
|
pressedKeys.insert("mousewheeldown");
|
||||||
} else {
|
} else {
|
||||||
pressedNonInt.insert("mousewheelleft");
|
pressedKeys.insert("mousewheelleft");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QMessageBox::information(this, tr("Cannot set mapping"),
|
QMessageBox::information(this, tr("Cannot set mapping"),
|
||||||
|
Loading…
Reference in New Issue
Block a user