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:
- Install scim.
- Add your locale to the scim global config (/etc/scim/global).
- Start scim from your xinitrc.
- Restart your X server - it now should work!
export XIM_PROGRAM="scim -d"