Recent

Author Topic: QT5 keys vs GTK2 keys [EDIT][SOLVED]  (Read 348 times)

OH1KH

  • Jr. Member
  • **
  • Posts: 61
QT5 keys vs GTK2 keys [EDIT][SOLVED]
« on: January 24, 2023, 08:45:22 am »
Hi!
I refer to issue  #40067 https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/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.

[EDIT]
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

« Last Edit: January 28, 2023, 11:52:53 am by OH1KH »
--
Saku

OH1KH

  • Jr. Member
  • **
  • Posts: 61
Re: QT5 keys vs GTK2 keys [EDIT]
« Reply #1 on: January 28, 2023, 11:52:18 am »
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.

--
Saku

 

TinyPortal © 2005-2018