Cannot use the numeric keypad with Qt Apps
-
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.
-
use xev to verify the keycodes and keysyms being returned. Your problem is non-Qt specific. You have to address it in X11.
-
@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.