[Gambas-user] Shortcut key issue

KKing kicking177 at gmail.com
Fri Dec 18 16:53:57 CET 2020


So I want a user to be able to jump to certain textboxes using shortcut 
keys. I can get it to work the first time but subsequent requests appear 
to be ignored?

I've prepared a simple test which has the following

> Public Sub Form_KeyPress()
>   If Key.Alt Then
>     If Key.Code = 65 Then
>       TextBox1.SetFocus
>     Endif
>     If Key.Code = 66 Then
>       TextBox2.SetFocus
>     Endif
>   Endif
> End

When I Alt+A it jumps to TextBox1 as desired, but if I then Alt+B it 
doesn't move to TextBox2.
If I kill the program and start again and do Alt+B it moves to TextBox2 
as desired but if I then Alt+A it does nothing.

This is on Deb10 with LXDE using G 3.12.2



More information about the User mailing list