If you are using *buntu/Mint etc (and maybe other distros) you could try
this: -
*Public Sub Form_Open()**
**Dim sKBFile As String[] = Split(File.Load("/etc/default/keyboard"),
gb.NewLine)**
**Dim sLine As String **
**
**For Each sLine In sKBFile**
** If sLine Begins "XKBLAYOUT" Then **Print sLine**
**Next**
**
End
*
Output using a UK (gb = Great Britain) keyboard is: -
*XKBLAYOUT="gb"
*Charlie*
*
On 01/10/18 22:01, Wael M via Gambas-user wrote:
thank you very much Lee
you solved it
I used:
Desktop.SendKeys("[Alt_L] + [Shift_L]")
so another problem appeared,
I need to detect if language is Arabic or English
I can't find a solution for that
Can you help me?
--------------------------------------------
On Mon, 10/1/18, T Lee Davidson <t.lee.david...@gmail.com> wrote:
Subject: Re: [Gambas-user] How to Change Keyboard Layout
To: gambas-user@lists.sourceforge.net
Date: Monday, October 1, 2018, 9:45 PM
Perhaps Desktop.SendKeys ?
___
Lee
On 10/1/18
12:42 PM, WAEL via Gambas-user wrote:
>
Hello
> I'm trying to change system
keyboard layout by pressing a key
> I
can't find the right code for doing so
> please help
> I usually
press Alt+Shift to change keyboard from English to Arabic
and vice
> versa, but I need to program
it to a button in my project
> I tried:
> system.language ="ar-EG"
> but it would change system locale not the
keyboard layout
> I tried to code
Alt+Shift in a button but also didn't work
> any ideas please...
>
>
>
> --
> Sent from: http://gambas.8142.n7.nabble.com/gambas-user-f3.html
>
>
>
_______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user