[Gambas-user] How to Change Keyboard Layout

Wael M wael79xy at yahoo.com
Thu Oct 4 21:40:38 CEST 2018

Thanks Gianluigi and thanks Lee
you both put some solutions that seems brilliant but I got confused and couldn't get an appropriate code out of those
is my fault I know but don't forget I'm new to Gambas 
so if you please could send me an example for a forum with two textboxes each one changes the keyboard language when it get focus, I will be profoundly appreciated

thanks again for your valuable time

On Thu, 10/4/18, T Lee Davidson <t.lee.davidson at gmail.com> wrote:

 Subject: Re: [Gambas-user] How to Change Keyboard Layout
 To: user at lists.gambas-basic.org
 Date: Thursday, October 4, 2018, 3:08 PM
 If each box will use a specific
 layout, you could use a semaphore.
 Public $IsEnglishLayout
 = True
 Public Sub
   If Not
 $IsEnglishLayout then Destkop.Sendkeys(blah)
   $IsEnglishLayout = True
 Public Sub
 $IsEnglishLayout then Destkop.Sendkeys(blah)
   $IsEnglishLayout = False
 On 10/3/18 5:27 PM, Wael M
 via User wrote:
 > Thank you very much
 Gianluigi for your help, grazie :)
 > it
 worked and could detect my language but not the way I
 > let me tell you my story :)
 > I came to linux from windows and I'm
 trying to translate an app I did with VB to the
 corresponding codes in Gambas.
 > I
 realized that Gambas is not the same as VB because Linux is
 not the same as windows
 > Gambas is just
 using the same names and following the main rules of VB 
 > in my app I had a form that with three
 textboxes are filled in Arabic and three are filled in
 > when I put the cursor in a
 textbox it detects the keyboard layout and change it to the
 desired language
 > I followed the code
 you gave but I want to put the event of this code to be when
 textbox got focus
 > here is the problem,
 when I put cursor in the desired textbox, it evokes the code
 and losing the focus the focus again the textbox making it
 evoking the same code again and so on
 so what I really need is to detect the keyboard layout like
 reading it directly from linux
 > again and again thank you very much for
 your patience and help
 ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----

More information about the User mailing list