I'd like to change the windows keyboard that is currently being used programatically.
I'm writing a dictionary program for an eastern language, and I want it to switch to another keyboard when the user clicks in a different table column.
I looked into this and found example using Windows PowerShell, and native C++ code. The PowerShell did not seem to work and I'm not familiar with the native Windows API and C. Any help on how to actually get this done in Java would be greatly appreciated.
Here's a blog post that explains how to do it: change input method
In a nutshell:
yourMainJFrame.getInputContext().selectInputMethod(new Locale("fa", "IR"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With