Tuesday, June 3, 2008

Arch Linux: Alt+gr not working in Java apps

I got quite confused when my good old trusty Alt+gr key did not work in NetBeans (since I use Norwegian keyboard layout, this key is essential for progamming). The key worked everywhere except in Java apps, actually. Luckily, I figured out how to fix it:

  1. Install scim.
  2. Add your locale to the scim global config (/etc/scim/global).
  3. Start scim from your xinitrc.
  4. Restart your X server - it now should work!
For good measure, here's my .xinitrc file:


# SCIM
export XMODIFIERS='@im=SCIM'
export GTK_IM_MODULE="scim"
export XIM_PROGRAM="scim -d"
export QT_IM_MODULE="scim"
scim -d
# OPENBOX
exec openbox-session

1 comment:

Federico said...

Hi!

Thanks to your post I found out that my keyboard/java problem was related to SCIM!

Thanks for publishing it :-)