Consider Qt::KeypadModifier relevant for global shortcuts

Otherwise kglobalaccel can't distinguish between numbers on the num block and other numbers

BUG: 453423

BUG: 446389
This commit is contained in:
Nicolas Fella 2024-01-24 01:51:49 +01:00 committed by Vlad Zahorodnii
parent 25150633ed
commit 296d3f31be

View file

@ -534,6 +534,9 @@ Qt::KeyboardModifiers Xkb::modifiersRelevantForGlobalShortcuts(uint32_t scanCode
if (xkb_state_mod_index_is_active(m_state, m_metaModifier, XKB_STATE_MODS_EFFECTIVE) == 1) {
mods |= Qt::MetaModifier;
}
if (m_keysym >= XKB_KEY_KP_Space && m_keysym <= XKB_KEY_KP_9) {
mods |= Qt::KeypadModifier;
}
Qt::KeyboardModifiers consumedMods = m_consumedModifiers;
if ((mods & Qt::ShiftModifier) && (consumedMods == Qt::ShiftModifier)) {