Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102440

QShortcut(QKeySequence("Num+Home")) is never triggered

    XMLWordPrintable

Details

    • Linux/X11

    Description

      I attached a small PyQt test case. I found the problem in a C++ app (Gwenview), PyQt is just easier.

      I believe the cause is this bit in QXkbCommon::possibleKeys:

      // turn off the modifier bits which doesn't participate in shortcuts
      Qt::KeyboardModifiers notNeeded = Qt::KeypadModifier | Qt::GroupSwitchModifier;
      modifiers &= ~notNeeded;
      

      It looks like this used to work some 10 years ago: https://codereview.qt-project.org/gitweb?p=qt/qtbase.git;a=commit;h=547a1bea492954d828aa0798be93384669812489{{}}

      Some digging revealed that MetaModifier was also in notNeeded once upon a time, but that was fixed. Maybe KeypadModifier can also be allowed to participate in shortcuts?

      Attachments

        1. numpad.py
          0.5 kB
          bitterblue

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              liaqi Liang Qi
              bitterblue bitterblue
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes