Dead keys not working in Java Swing applications

javakeyboardlocale

I'm currently using Ubuntu 10.10 and Netbeans 7.0 and I can't type accented letters with dead keys any more. It's not a version specific problem seems it's related with Swing since I've got the same problem with older version of Netbeans and OS.

When I type '+a on any app on Linux I get a á vowel. All Linux apps are working fine, but Netbeans doesn't. When I type '+a on Netbeans I get a a vowel (no accent). I can't type quotes and double quotes either.

But I got accents on Netbeans using the right Alt key. (that's not what I want)

At terminal I got the following locale:

LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

Best Answer

I think I've just found the fix for the same problem, thanks to this answer.

Briefly: seems to be a problem with ibus. I've tried both to launch the java app (in my case freemind) with XMODIFIERS="" freemind and setting up ibus with ibus-setup and now I can write accented vowels (using deadkeys in the ES keyboard).

Related Question