From 296d3f31be9f7148c4296a284d9c76271c6ed5bd Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Wed, 24 Jan 2024 01:51:49 +0100 Subject: [PATCH] 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 --- src/xkb.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xkb.cpp b/src/xkb.cpp index 9a729b66be..0289bd49d3 100644 --- a/src/xkb.cpp +++ b/src/xkb.cpp @@ -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)) {