There is a way to switch which key that Mac OS X recognizes as meta by using an X11 keyboard mapping preference file. First, uncheck the “Use the system keyboard layout” option in X11 preferences. You may also have to disable the “Enable keyboard shortcuts under X11″ option as well. Then, create (or add to) the file ~/.Xmodmap and insert the following six lines:
clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
add Mod1 = Meta_L
add Mod2 = Mode_switch
It clears the keymappings for alt and escape and then reassigns them to the reverse of what they were before. Restart X11 and it should pick up the changes.


