I use a custom XKB keymap in which I access special characters using the alt-gr key, for example alt-gr + c -> ç. Now on my Macbook Pro, the alt-gr is a little bit too far to the right for my taste, and I keep pressing the right command key instead. Since I have no need for this key, I thought I'd simply remap it to alt-gr as well.

I added the following to my XKB layout ( /usr/share/X11/symbols/ )
include "level3(rwin_switch)"

The gnome keyboard settings tool also has an option for doing a same thing graphically. However, it does not work in GTK/Gnome applications! IThe settings works fine in X itself and other applications like QT apps. But in Gnome, both alt-gr and the right command key cease to function. I think this is a bug so I filed a bug report here: https://bugzilla.gnome.org/show_bug.cgi?id=599270 .

I wonder if anybody else has come across this problem and possibly found a solution?