[Gambas-user] Keyboard-commands navigating buttons

Hartmut Wagener hartmut.w.wagener at t-online.de
Mon May 1 23:54:36 CEST 2023


Thanks a lot, this works... :)


Am 01.05.23 um 23:22 schrieb Bruce Steers:
>
>
> On Mon, 1 May 2023 at 22:01, Hartmut Wagener 
> <hartmut.w.wagener at t-online.de> wrote:
>
>     Hi,
>
>     i have some tools that is use to start rograms. These are several
>     Gambas-Programs that use buttons to start different programs.
>
>     In the past (some years ago), the cursor-commands went through the
>     buttons, so i could use them to navigate a button and press enter to
>     start it.
>
>     Since some time (a year or more), this was not possible, i added a
>     keyboard-control to stear the focus of the buttons.
>
>     Since today i have changed my desktop from Mate to Plasma, and i was
>     astonished that each Cursor-Keypress now moves two buttons, so i
>     need to
>     disable my keyboard-control.
>
>
>     How can i manage to find out if the programs runs on a system that
>     needs
>     the additional- keyboard-thing or not?
>
>     Thanks a lot
>
>
> Have you tried using the instruction...
>
> Stop Event
>
> http://gambaswiki.org/wiki/lang/stopevent
>
> see if it stops the keypress event going any further than your custom 
> method.
>
> Select Case chara
>        Case Key.Up
>          moveup
> Stop Event
>        Case Key.Down
>          movedown
> Stop Event
>      End Select
>
>
> BruceS
>
>
>
>     PS: My keyboard-control looks like that:
>
>
>     Public Sub Form_KeyPress()
>        ' Tastendruck
>        Dim ltext As Variant
>        Dim chara As Integer
>        ltext = Key.Text
>        chara = Key.Code
>        If Not IsNull(ltext) Then
>          chara = Asc(ltext)
>          If chara = 27 Then
>            Me.close
>
>          endif
>
>     Else
>          Select Case chara
>            Case Key.Up
>              moveup
>            Case Key.Down
>              movedown
>          End Select
>        Endif
>
>
>     ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> ----[http://gambaswiki.org/wiki/doc/netiquette  ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230501/d063e20e/attachment-0001.htm>


More information about the User mailing list