Can't switch keyboard layout using java applications

Bug #238859 reported by Thomas Fritzsche
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
sun-java6 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm working in international environment German/Japanese and need to switch the keyboard layout during application usage (simply my keyboard doesn't provide all necessary keys in one layout). I'm using the gnome keyboard indicator applet for this and it pretty good for me.

However this doesn't seems to work for any java applications. System seems to stay with whatever you selected as default and I have not find a way to change the layout.
I notice this when using netbeans development environment and I found the same behavior can be seen also in other Java applications (e.g. Java Console). So I guess it's a general Java issue.
As I couldn't find anything with google of the search here, I posted this ticket. Any help is highly welcome.

Revision history for this message
Vladislav Muravyev (rex-lux) wrote :

I have the same problem with US_intl/Russian GNOME Layouts and SCIM (Chinese pinyin, Wubi) Layouts. When i try to change layout at python program (Pmw, Tk based and may be others).

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

For Java I could walk around setting env. variable:
AWT_TOOLKIT=MToolkit
Is not a solution, but better then nothing.

Revision history for this message
Dmitry Zotikov (xio) wrote :

Same for me, can't switch layouts in java applications (netbeans, freemind).

Revision history for this message
Thomas Fritzsche (tf-noto) wrote :

Found problem with SCIM caused problem with me.
As I don't need Japanese input for netbeans I disabled by adding the following line in the netbeans starter script:
---------------------------
export XMODIFIERS=''
---------------------------
If you use SCIM, you can easy find with search the other bug reports with more details.
With this I don't need "AWT_TOOLKIT=MToolkit" any more.

Revision history for this message
Dmitry Zotikov (xio) wrote :

Works, thanks, Thomas

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sun-java6 (Ubuntu):
status: New → Confirmed
Revision history for this message
Dmitry Piyavkin (piyavkin) wrote :

I had the same problem with keyboard layout switching in FreeMind (java app) on Debian GNU/Linux 6.0.5 (squeeze). I also use scim for Japanese.

I've solved my problem in the next way:

$ sudo gedit /etc/scim/global
/SupportedUnicodeLocales = en_US.UTF-8 ----------> /SupportedUnicodeLocales = en_US.UTF-8,ru_RU.UTF-8

Reboot.

After that I can switch Ru and En layouts as usual. (Also it has somehow solved the problem with Japanese typing in FreeMind.)

I hope it may be useful for someone.

Revision history for this message
Vasiliy Pedak (truvazia) wrote :

Same problem in ubuntu 12.04 with GNOME as UI. But I found that I can switch layout by changing the order of layouts in the Keyboard Layout Settings -> Layouts.

vasiliy@vasiliy-desktop:~$ java -showversion
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.