Forum > QT

QT5 keys vs GTK2 keys [EDIT][SOLVED]


I refer to issue  #40067 that was programmers fault.

How ever when using that kind of code (that finally worked) I have now noticed that if QT5 widgets are used the numerical keypad works properly.

If same code is compiled with GTK2 widgets the numerical keypad is dead.

In both cases numbers at alphabet section of keyboard will work ok. It is just the numerical keys that do not work similar way.(right from alphabet keys).

Could there be something that I still do not know?
IMHO the keypad should work in same way with both widgets.

I do not like to make an issue if it is again programmer's fault.

Forgot to say this is Fedora 37 Linux and Lazarus 2.2.4 (rev Unknown) FPC 3.2.2 x86_64-linux-gtk2

Attached pdf that shows difference in keycodes between GTK2 and QT5

Answer to myself:

I do not know if this is bug or not but.

If you are reading numeric keyboard with GTK2 widgets you get keys 0..9 from numeric keypad (right from alpha keys) as VK_NUMPAD0..VK_NUMPAD9

If you are reading numeric keyboard with QT5 widgets  you get same keys 0..9  as VK_0...VK_9 but also  as VK_NUMPAD0..VK_NUMPAD9

If you have made you code with QT5 and then wonder why numeric keypad is dead with GTK2 while it worked with QT5 you have used only VK_0...VK_9 and must add VK_NUMPAD0..VK_NUMPAD9 to get GTK2 compiled version work.


[0] Message Index

Go to full version