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:
Private i As Integer = 0
Public Sub Form_KeyPress()
If Key.Right Then
i = i + 1
Me.Text = CStr(i)
Endif
End
Public Sub Form_MouseWheel()
' Empty on purpose
End
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