Here’s the problem: I have a user with disabilities and using a specialized virtual keyboard. He doesn’t have any trouble switching languages in his virtual keyboard, but it doesn’t always change the input language (input keyboard?) of the currently-active application – which is exactly what he needs.
So is there any API calls I can do to query a window’s current input keyboard? More importantly, is there a way I can externally set another window’s input language?
There is the “InputLanguage” class in System.Windows.Forms (.NET). It allows you to set the desired input language. More information available in MSDN InputLanguage class description.
As for setting the language for a specific window – there is a solution for this:
I suggest you go over an example – http://www.java2s.com/Tutorial/CSharp/0520__Windows/GetcurrentActiveWindow.htm – it is the basics you will need to get information about the currently active programs. An example of setting input language is available in the MSDN article.