Search code examples
windowspowershellwindows-10keyboard-layout

Add International English keyboard in windows 10 through the powershell


It is a known issue that in windows 10 when you decide to add multiple languages you end up with several keyboards that you can not get rid off. A well known solution that I have used in order to have only Greek and English keyboards is to create a powershell script that runs on startup with the following content.

$1 = Get-WinUserLanguageList
$1.RemoveAll( { $args[0].LanguageTag -clike '*' } )
$1.Add("el")
$1.Add("en-US")
Set-WinUserLanguageList $1 -Force

The minor problem that I have is that instead of plain English I want to use the English International qwerty keyboard so that I can add French accents for example. The label of this keyboard when installed on the tray is EN-INTL.

I know that the line I need to modify is $1.Add("en-US") but I am not aware which attribute to use.

Does anyone has this information to share?

Kind Regards, Alexios


Solution

  • I don't know the answer to this. I know how you can find the answer to this:

    1. Manually set the keyboard language to US International (or any other). Note that this is considered as a "Layout" not as a language like "en-US".
    2. Run in powershell Get-WinUserLanguageList

    Example Output:

    PS C:\> Get-WinUserLanguageList
    LanguageTag     : en-US
    Autonym         : English (United States) 
    EnglishName     : English (United States) 
    LocalizedName   : English (United States) 
    ScriptName      : Latin
    InputMethodTips : {0409:00000409}
    Handwriting     : False 
    LanguageTag     : fr-FR
    Autonym         : français (France) 
    EnglishName     : French (France) 
    LocalizedName   : French (France) 
    ScriptName      : Latin
    InputMethodTips : {040c:0000040c}
    Handwriting     : False
    

    Note the number in setting InputMethodTips. In this example it's 0409:00000409.

    1. You change your script to this. The number 0409:00020409 is what you want for English International layout:
    $1 = Get-WinUserLanguageList
    $1.RemoveAll( { $args[0].LanguageTag -clike '*' } )
    $1.Add("el")
    $1.Add("en-US")
    $1[1].InputMethodTips.Clear() # 1 is the second language → en-US
    $1[1].InputMethodTips.Add('0409:00020409') # You change this to the number you got from step #1
    Set-WinUserLanguageList -LanguageList $1 -Force 
    

    You now have the English International layout for your second language en-US.

    Cheers