Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Keypad works differently now?

Keypad works differently now?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 663 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    boatrightcd
    wrote on last edited by boatrightcd
    #1

    My team just upgraded from Qt 5.10 to 5.13 and some keyboard shortcuts that were fine previously have quit working. In particular, we were using things such as Ctrl+[0-9] for changing one of our settings. While this always worked, and continued to work, for the numeric keys along the top of the keyboard, our users found it convenient to use the keypad's keys as well. This application is used on a laptop, not a mobile device.

    This is an example of how we specified the sequences:
    actions_.push_back(create_setting_action(tr("Setting Value 2"), QKeySequence{Qt::CTRL + Qt::Key_2}, Setting::SETTING_VALUE_2));

    Then in our key press handler we build a QKeySequence based on the QKeyEvent's modifiers and key() value, and see if an entry in actions_ has a matching sequence.

    I'm not sure why it worked in 5.10 but not in 5.13 and have seen other forums where people have had this problem going back to 5.12. We discovered that holding shift along with Ctrl and 2 on the keypad will create a match to the key sequence, but what I'm looking for is how to get our original functionality back, where Ctrl+2 (or any other numeric value on the keypad) will work for both the top row of the keyboard and the keypad.

    Addendum:

    A teammate just pointed out to me that it's not just the keyboard shortcuts that aren't working, the keypad won't work for text input without holding down shift. Yes, I've checked NumLock. This only started with the upgrade from Qt 5.10 -> 5.13

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Can you check whether it also happens with Qt 5.12.4 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • B Offline
        B Offline
        boatrightcd
        wrote on last edited by
        #3

        Unfortunately I can't check another Qt version quickly with my team's codebase and build system. That version number has seemed to be the culprit in what I've found searching the web for others with the same problem. I haven't found a way to mitigate the issue in those searches.

        Our Qt libraries are built from source, maybe there's a build setting that could have caused this issue? It definitely behaves as if it is ignoring num-lock entirely.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I am not aware of such a setting since it's more of a system setting.

          In any case, can you share the options you are using ?

          By the way, 5.13.1 is about to be branched, it might be worth checking.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • B Offline
            B Offline
            boatrightcd
            wrote on last edited by
            #5

            The only build options used with configure were -qt-xcb -no-reduce-relocations -nomake examples -nomake tests -opensource -confirm-license

            We're on Ubuntu 16.04, if that makes a difference.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved