Modify keyboard layout

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Kaustubh Kumar Kaustubh Kumar 4 months, 3 weeks ago.

  • Author
    Posts
  • #65625
    Profile photo of Erik
    Erik
    Participant

    Hi,

    I am struggling with changing the keyboard layout in Windows 10 1607 using PowerShell.

    The result I am looking for is shown in this image: https://ibin.co/3EBwRX02fLI2.png
    I managed to set this configuration manually using the GUI. But now I would like to get the same result in an automated fashion 🙂

    I want only one entry in the list and that should be English (United States) and the keyboard layout should be Swedish.

    The code I have tried is this

    $languageList = New-WinUserLanguageList en-US
    $languageList[0].InputMethodTips.Clear()
    $languageList[0].InputMethodTips.Add('041D:0000041D')
    Set-WinUserLanguageList $languageList -Force
    

    But this gives me the following result, https://ibin.co/3EBxrZottezj.png

    It adds Swedish as a second entry in the list.

    Not sure what else to try and would appreciate some assistance.

    Regards Erik

  • #65631
    Profile photo of Kaustubh Kumar
    Kaustubh Kumar
    Participant

    $languageList = New-WinUserLanguageList en-US
    $languageList[0].InputMethodTips.Clear()
    $languageList[0].InputMethodTips.Add('041D:0000041D')
    #Set-WinUserLanguageList $languageList -Force
    Set-WinUserLanguageList -LanguageList en-US

    • #65640
      Profile photo of Erik
      Erik
      Participant

      Hi Kaustubh,

      Thanks for reaching out!

      Unfortunately that does not seem to work.

      When I try those commands I end up with one language, English (United States), but the keyboard layout is US and not Swedish.

  • #65655
    Profile photo of Kaustubh Kumar
    Kaustubh Kumar
    Participant

    $languageList = New-WinUserLanguageList en-US
    $languageList[0].InputMethodTips.Clear()
    Set-WinUserLanguageList sv-se -Force

    This works for me.

You must be logged in to reply to this topic.