Change windows keyboard in java?

I would like to change the Windows keyboard, which is currently used programmatically.

I am writing a dictionary for an oriental language, and I want it to switch to another keyboard when the user clicks on another column of the table.

I looked through this example and found an example using Windows PowerShell and native C ++ code. PowerShell does not seem to work, and I am not familiar with the native Windows API and C. Any help on how to do this in Java would be greatly appreciated.

+5
source share
1 answer

Here's a blog post explaining how to do this: change the input method
In a nutshell:

yourMainJFrame.getInputContext().selectInputMethod(new Locale("fa", "IR")); 
+4
source

All Articles