I have a list of keyboard layouts already configured (for instance, us
, dv
, and ru
); I switch between them with Win+Space, and the list changes occasionally. However, I have a need to switch to one of these configured layouts (without modifying the list) programmatically.
How can this be done from the command-line? (CMD would be preferred, though a PowerShell or VBScript solution would be acceptable if it's not possible though CMD.)
This is not a duplicate of How to change keyboard layout via command line cmd.exe on Windows XP/7?, which Accepted an answer stating how to change the list of keyboard layouts. As per the title, I am asking in this question how to change the keyboard layout -- that is, the active one -- without modifying the list of enabled layouts.
Set-WinUserLanguageList
working well enough for my needs: although it sets the whole language list the first keyboard layout on the first language also gets active when running the script.