First of all you should understand which keycode is assigned to which key. To do this: # xev and press the key you want to modify. You'll see something like "keycode XXX". For example I wan to remap "apple" as "AltGr". So I give: # xmodmap -e "keycode 115 = Mode_switch" that modifies things temporarily and try my setting. If everything works fine, I create in the home directories a .Xmodmap file in which I write: keycode 115 = Mode_switch and since I use gdm I create a file named /etc/X11/Xsession.options in which I write: allow-user-xmodmap I save and reboot: everything works, mission accomplished.