We have a number of KB articles that talk about this. They are all out of date!
We need to go through the various methods; look at https://community.software.sil.org/t/is-it-possible-to-switch-keyboard-layouts-programmatically/4398/4 as a starting point. Provide code examples (in C++, .NET, WScript?) and pure Windows (TSF) as well as Keyman COM API based solutions, at least. Note older, incomplete methods such as ActivateKeyboardLayout but do not promote those.
KB articles need to be updated to point to more comprehensive and up-to-date answer:
I suggest writing a new KB article, and then linking all the old articles to the new one, rather than editing the existing articles.
We have a number of KB articles that talk about this. They are all out of date!
We need to go through the various methods; look at https://community.software.sil.org/t/is-it-possible-to-switch-keyboard-layouts-programmatically/4398/4 as a starting point. Provide code examples (in C++, .NET, WScript?) and pure Windows (TSF) as well as Keyman COM API based solutions, at least. Note older, incomplete methods such as ActivateKeyboardLayout but do not promote those.
KB articles need to be updated to point to more comprehensive and up-to-date answer:
I suggest writing a new KB article, and then linking all the old articles to the new one, rather than editing the existing articles.