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. Cannot use the numeric keypad with Qt Apps
Forum Updated to NodeBB v4.3 + New Features

Cannot use the numeric keypad with Qt Apps

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 947 Views 1 Watching
  • 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.
  • I Offline
    I Offline
    itanitarek10
    wrote on 11 Nov 2021, 16:28 last edited by itanitarek10 11 Nov 2021, 16:52
    #1

    Hello,

    As the title states the numeric keypad on the right side of my keyboard does not work with Qt applications. I first thought it was an OS problem (using RHEL 8.4) because they would not work anywhere. But after using the

    setxkbmap -option keypad:pointerkeys
    

    command they would work on the OS when toggling num lock. However now that I can use it for the OS, they still do not work with Qt. How can I resolve this? I am using a 32-bit version of Qt 5.14.0 on RedHat 8.4.

    Thank you

    Edit: I found out that if I have numlock off and press shift + a key the number can be entered. However with numlock on, the keypad is (mostly) useless.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kent-Dorfman
      wrote on 11 Nov 2021, 22:48 last edited by
      #2

      use xev to verify the keycodes and keysyms being returned. Your problem is non-Qt specific. You have to address it in X11.

      https://tronche.com/gui/x/xlib/input/keyboard-encoding.html

      I 1 Reply Last reply 12 Nov 2021, 18:22
      0
      • K Kent-Dorfman
        11 Nov 2021, 22:48

        use xev to verify the keycodes and keysyms being returned. Your problem is non-Qt specific. You have to address it in X11.

        https://tronche.com/gui/x/xlib/input/keyboard-encoding.html

        I Offline
        I Offline
        itanitarek10
        wrote on 12 Nov 2021, 18:22 last edited by itanitarek10 11 Dec 2021, 18:23
        #3

        @Kent-Dorfman Thanks for the link. After using xev I can see that the keycodes and keysyms are different for the numbers at the top row than on the keypad. However I still do not understand why Qt cannot pickup the keypad numbers with numlock enabled when the terminal and other X11 applications can.

        However, using the shift key + numlock disabled + a keypad number works with Qt.

        1 Reply Last reply
        0

        1/3

        11 Nov 2021, 16:28

        • Login

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