KeyPress event double fires after using MouseWheel
Posted
#1
(In Topic #1014)
Regular

1) Create new "Graphical application"
2) Add a Button to FMain (we shall call it Button1, no events needed)
3) Paste this code to FMain.class:
4) Run
5) Try pressing right arrow on the keyboard to increment i by 1
6) Turn the mouse wheel once.
7) Try pressing right arrow on the keyboard and it increments i twice !?!?
8) Click Button1.
9) Try pressing right arrow on the keyboard again and it will increment i by 1
The weird behaviour has something to do with .HasFocus
Am I missing something here or is this a bug that should be reported to Benoit Minisini?
PS: I am using Gambas 3.18.90 on Linux Mint 21.1 Cinnamon 5.6.8
Posted
Regular

I get the increment of the global variable, even if I press the other keys.JumpyVB said
So, I propose to use this other line of code:
It doesn't happen to me.JumpyVB said
7) Try pressing right arrow on the keyboard and it increments i twice !?!?
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Regular

vuott said
It doesn't happen to me.![]()
Whats your gambas and os version?
Posted
Guru

Posted
Regular

cogier said
I'm also using Mint 21.1 and the problem you report also happens to me, but I have discovered that this only happens with gb.gui. If you change from GTK to QT using gb.gui.qt instead, the problem goes away. Whether this is a bug in Gambas or in GTK, I leave to others to work out.
Thank you for confirming.
1 guest and 0 members have just viewed this.


