mirror of https://github.com/mgba-emu/mgba.git
Qt: Exclude keypad events from being modifiers
This commit is contained in:
parent
5ef980116a
commit
2083aa921b
|
@ -311,9 +311,9 @@ bool ShortcutController::eventFilter(QObject*, QEvent* event) {
|
||||||
}
|
}
|
||||||
int key = keyEvent->key();
|
int key = keyEvent->key();
|
||||||
if (!isModifierKey(key)) {
|
if (!isModifierKey(key)) {
|
||||||
key |= keyEvent->modifiers();
|
key |= (keyEvent->modifiers() & ~Qt::KeypadModifier);
|
||||||
} else {
|
} else {
|
||||||
key = toModifierKey(key | keyEvent->modifiers());
|
key = toModifierKey(key | (keyEvent->modifiers() & ~Qt::KeypadModifier));
|
||||||
}
|
}
|
||||||
auto item = m_heldKeys.find(key);
|
auto item = m_heldKeys.find(key);
|
||||||
if (item != m_heldKeys.end()) {
|
if (item != m_heldKeys.end()) {
|
||||||
|
|
Loading…
Reference in New Issue