khaled fahad
khaled fahad

Reputation:

how to change the input source (language) in java (instead of using Shift+alt)?

I am writing an application to remap some of the keyboard keys. I want to add a button so that if the user clicks on it, the input source will change to the next input in the OS. I am using it to input source arabic and english. What should I use, and is it possible to do that in java?

Upvotes: 2

Views: 1989

Answers (2)

Michael Borgwardt
Michael Borgwardt

Reputation: 346317

I believe InputContext.selectInputMethod() is what you're looking for. This article also describes how to set the input method via system menus or hotkey.

Upvotes: 1

willcodejavaforfood
willcodejavaforfood

Reputation: 44063

Have a look at the Java Method Input Framework.

Upvotes: 1

Related Questions