plugins/buttonrebinds: remove modifiers before keysym conversion

QXkbCommon::toKeysym can't handle modifiers in key.

CCBUG: 482847
This commit is contained in:
Yifan Zhu 2024-03-10 14:13:24 -07:00
parent 0b4c6f8b3b
commit 6c4551ff46

View file

@ -300,7 +300,7 @@ bool ButtonRebindsFilter::sendKeySequence(const QKeySequence &keys, bool pressed
}
}
QKeyEvent ev(QEvent::KeyPress, keys[0], Qt::NoModifier);
QKeyEvent ev(QEvent::KeyPress, keys[0] & ~Qt::KeyboardModifierMask, Qt::NoModifier);
const QList<xkb_keysym_t> syms(QXkbCommon::toKeysym(&ev));
if (syms.empty()) {
qCWarning(KWIN_BUTTONREBINDS) << "Could not convert" << keys << "to keysym";